Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Extend streaming support and pass streaming bodies through Rack #20

Merged
merged 5 commits into from Dec 3, 2012
Merged

Extend streaming support and pass streaming bodies through Rack #20

merged 5 commits into from Dec 3, 2012

Conversation

ghost
Copy link

@ghost ghost commented Nov 26, 2012

Added seamless support for Server-Sent Events, Chunked bodies as well as generic streamed bodies.

See examples/server-sent-events.rb, examples/chunked.rb and examples/stream.rb

Will do my best to write full specs for this when/if i get some time.

Also fixed streaming support for Enumerable - there were missing CRLF after each chunk.

@tarcieri
Copy link
Member

Nice! Give me a bit more time to review this in detail, but I like where you're going

@@ -138,24 +138,23 @@ def respond(response, headers_or_body = {}, body = nil)
# Write body chunks directly to the connection
def write(chunk)
raise StateError, "not in chunked body mode" unless @response_state == :chunked_body
chunk_header = chunk.bytesize.to_s(16) + Response::CRLF
@socket << chunk_header
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was faster because no new string instances

@ghost
Copy link
Author

ghost commented Nov 30, 2012

@tarcieri, had you a chance to take a look over this?

any plans regard new gem release?

@tarcieri
Copy link
Member

Sorry, haven't had time to review this yet. And yeah, I can spin a new gem release.

tarcieri added a commit that referenced this pull request Dec 3, 2012
Extend streaming support and pass streaming bodies through Rack
@tarcieri tarcieri merged commit 1e9b550 into celluloid:master Dec 3, 2012
kenichi pushed a commit to kenichi/reel that referenced this pull request Aug 4, 2016
Updated/improved deleting_timer,configuration,crypto and specs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants