summary refs log tree commit
diff options
context:
space:
mode:
authorMaël Clérambault <maelclerambault@yahoo.fr>2011-03-18 16:05:42 -0700
committerJames Tucker <jftucker@gmail.com>2011-05-23 00:15:59 -0700
commit85cd4f047edaaa6ff112691720096dba4cadf9f5 (patch)
treee9d82b9db7b29fb45d71a34cd3a94324437cf4a2
parentdeab855f2894a1e50e737464e0008d94f41529e6 (diff)
downloadrack-85cd4f047edaaa6ff112691720096dba4cadf9f5.tar.gz
Force content-length to 0 so apache mod_xsendfile does not hang
-rw-r--r--lib/rack/sendfile.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rack/sendfile.rb b/lib/rack/sendfile.rb
index 911ae409..645a8cfc 100644
--- a/lib/rack/sendfile.rb
+++ b/lib/rack/sendfile.rb
@@ -117,6 +117,7 @@ module Rack
           end
         when 'X-Sendfile', 'X-Lighttpd-Send-File'
           path = F.expand_path(body.to_path)
+          headers['Content-Length'] = '0'
           headers[type] = path
           body = []
         when '', nil