diff options
author | Maël Clérambault <maelclerambault@yahoo.fr> | 2011-03-18 16:05:42 -0700 |
---|---|---|
committer | Maël Clérambault <maelclerambault@yahoo.fr> | 2011-03-18 16:05:42 -0700 |
commit | 215180ab994c8a9f1f6d87f8cef2280e61a7cafc (patch) | |
tree | 42d35d4c9104c167b7e49d0e2fbb9b517a887901 | |
parent | 1a5a44ab518c1cc97e429d717979f09c1369c88f (diff) | |
download | rack-215180ab994c8a9f1f6d87f8cef2280e61a7cafc.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 19cfd74a..87ae66ee 100644 --- a/lib/rack/sendfile.rb +++ b/lib/rack/sendfile.rb @@ -112,6 +112,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 |