rev + em: more easily allow Content-Length in pipe responses
commit1e6d3d19da2b62bfe7f8fd7827dcad3ee3fe9923
authorEric Wong <normalperson@yhbt.net>
Mon, 19 Jul 2010 10:09:56 +0000 (19 10:09 +0000)
committerEric Wong <normalperson@yhbt.net>
Tue, 20 Jul 2010 00:04:26 +0000 (19 17:04 -0700)
tree5de875617e5cf3befb7c0ae9e1add9b2ee2f451e
parentcc18035c5105751a3e67a8e449ee0021fd313ea9
rev + em: more easily allow Content-Length in pipe responses

If a response proxying a pipe (or socket) includes a
Content-Length, do not attempt to outsmart the application
and just use the given Content-Length.

This helps avoid exposing applications to weird internals such
as env["rainbows.autochunk"] and X-Rainbows-* response headers.
lib/rainbows/dev_fd_response.rb
lib/rainbows/ev_core.rb
lib/rainbows/event_machine.rb
lib/rainbows/rev/client.rb
t/fast-pipe-response.ru