diff options
author | Maël Clérambault <maelclerambault@yahoo.fr> | 2011-03-18 16:05:42 -0700 |
---|---|---|
committer | James Tucker <jftucker@gmail.com> | 2011-05-23 00:15:59 -0700 |
commit | 85cd4f047edaaa6ff112691720096dba4cadf9f5 (patch) | |
tree | e9d82b9db7b29fb45d71a34cd3a94324437cf4a2 | |
parent | deab855f2894a1e50e737464e0008d94f41529e6 (diff) | |
download | rack-85cd4f047edaaa6ff112691720096dba4cadf9f5.tar.gz |
Force content-length to 0 so apache mod_xsendfile does not hang
-rw-r--r-- | lib/rack/sendfile.rb | 1 |
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 |