lib/rack/sendfile.rb in rack-1.6.0.beta vs lib/rack/sendfile.rb in rack-1.6.0.beta2
- old
+ new
@@ -114,21 +114,21 @@
if body.respond_to?(:to_path)
case type = variation(env)
when 'X-Accel-Redirect'
path = F.expand_path(body.to_path)
if url = map_accel_path(env, path)
- headers['Content-Length'] = '0'
+ headers[CONTENT_LENGTH] = '0'
headers[type] = url
obody = body
body = Rack::BodyProxy.new([]) do
obody.close if obody.respond_to?(:close)
end
else
env['rack.errors'].puts "X-Accel-Mapping header missing"
end
when 'X-Sendfile', 'X-Lighttpd-Send-File'
path = F.expand_path(body.to_path)
- headers['Content-Length'] = '0'
+ headers[CONTENT_LENGTH] = '0'
headers[type] = path
obody = body
body = Rack::BodyProxy.new([]) do
obody.close if obody.respond_to?(:close)
end