perplexes / m2r

Mongrel2 Connection Adapter - Ruby Encrusted Steel-Reinforced Fist
MIT License
90 stars 11 forks source link

Make sure chunked responses from Rails works ok #42

Open paneq opened 12 years ago

paneq commented 12 years ago

https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-core/j5F0LchIaX8

It is problematic for some servers and probably does not work correctly right now

buffer = ""
body.each { |part| buffer << part }
return Response.new(status, headers, buffer)

We could check the Transfer-Encoding header for chunked value and send every chunk separately to m2 (and probably an empty one at the end).

paneq commented 11 years ago

Or we could just deliver every part to m2 as separate ZMQ message.