Skip to content

Commit

Permalink
Don’t delete Content-Length if streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
lukateras committed Sep 24, 2013
1 parent 65a00a2 commit 56848e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sinatra/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def body(value = nil, &block)
def block.each; yield(call) end
response.body = block
elsif value
headers.delete 'Content-Length' unless request.head? || value.is_a?(Rack::File)
headers.delete 'Content-Length' unless request.head? || value.is_a?(Rack::File) || value.is_a?(Stream)
response.body = value
else
response.body
Expand Down

0 comments on commit 56848e4

Please sign in to comment.