about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-07-19 10:09:52 +0000
committerEric Wong <normalperson@yhbt.net>2010-07-19 17:04:22 -0700
commit12205e29b29f844295d1794bfe10634646541f20 (patch)
tree93173038c063a4ec3c8e5e170e48ce6f7fa485cc
parent269ef624a0a722ca07a04c77d8e4e4e61413dcdd (diff)
downloadrainbows-12205e29b29f844295d1794bfe10634646541f20.tar.gz
Rack::File already sets the Content-Length header for us,
so there's no reason to ever set this ourselves.
-rw-r--r--lib/rainbows/event_machine.rb2
-rw-r--r--lib/rainbows/rev/client.rb2
2 files changed, 0 insertions, 4 deletions
diff --git a/lib/rainbows/event_machine.rb b/lib/rainbows/event_machine.rb
index 1a5e8be..77fc962 100644
--- a/lib/rainbows/event_machine.rb
+++ b/lib/rainbows/event_machine.rb
@@ -133,8 +133,6 @@ module Rainbows
 
           if st.file?
             if headers
-              headers.delete('Transfer-Encoding')
-              headers['Content-Length'] ||= st.size.to_s
               headers[CONNECTION] = alive ? KEEP_ALIVE : CLOSE
               write(response_header(status, headers))
             end
diff --git a/lib/rainbows/rev/client.rb b/lib/rainbows/rev/client.rb
index ba1a6c8..bc3785f 100644
--- a/lib/rainbows/rev/client.rb
+++ b/lib/rainbows/rev/client.rb
@@ -83,8 +83,6 @@ module Rainbows
 
           if st.file?
             if headers
-              headers.delete('Transfer-Encoding')
-              headers['Content-Length'] ||= st.size.to_s
               headers[CONNECTION] = alive ? KEEP_ALIVE : CLOSE
               write(response_header(status, headers))
             end