Skip to content

Commit e1d0b23

Browse files
author
Philip (flip) Kromer
committed
made the stream example pass a newline on each fire -- this means that curl will show the streaming-ness
1 parent 62a742e commit e1d0b23

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎examples/stream.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def on_close(env)
2121
def response(env)
2222
i = 0
2323
pt = EM.add_periodic_timer(1) do
24-
env.stream_send("#{i} ")
24+
env.stream_send("#{i}\n")
2525
i += 1
2626
end
2727

@@ -32,6 +32,6 @@ def response(env)
3232
env.stream_close
3333
end
3434

35-
[202, {'X-Stream' => 'Goliath'}, Goliath::Response::STREAMING]
35+
streaming_response(202, {'X-Stream' => 'Goliath'})
3636
end
3737
end

0 commit comments

Comments
 (0)