summary refs log tree commit homepage
path: root/lib/rainbows/dev_fd_response.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-01-19 18:07:13 -0800
committerEric Wong <normalperson@yhbt.net>2011-01-19 18:07:13 -0800
commitfc355db99bdbe72644e4691a7a107b6a29c77be6 (patch)
tree4cac8ca3af4f63729ad96fd79372f514b7b2656f /lib/rainbows/dev_fd_response.rb
parentd59ea817d624478176212f27bb79976c371a9c6f (diff)
chunked Transfer-Encoding is only valid for HTTP/1.1
Diffstat (limited to 'lib/rainbows/dev_fd_response.rb')
-rw-r--r--lib/rainbows/dev_fd_response.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/dev_fd_response.rb b/lib/rainbows/dev_fd_response.rb
index 1d50a2c..a42697d 100644
--- a/lib/rainbows/dev_fd_response.rb
+++ b/lib/rainbows/dev_fd_response.rb
@@ -48,7 +48,7 @@ class Rainbows::DevFdResponse < Struct.new(:app)
       headers.delete('Transfer-Encoding')
     elsif st.pipe? || st.socket? # epoll-able things
       unless headers.include?('Content-Length')
-        if env['rainbows.autochunk']
+        if env['rainbows.autochunk'] && "HTTP/1.0" != env["HTTP_VERSION"]
           headers['Transfer-Encoding'] = 'chunked'
         else
           env['rainbows.autochunk'] = false