Skip to content

Commit

Permalink
Force content-length to 0 so apache mod_xsendfile does not hang
Browse files Browse the repository at this point in the history
  • Loading branch information
Maël Clérambault authored and raggi committed May 23, 2011
1 parent deab855 commit 85cd4f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rack/sendfile.rb
Expand Up @@ -117,6 +117,7 @@ def call(env)
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
Expand Down

0 comments on commit 85cd4f0

Please sign in to comment.