1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

resetting body should drop Content-Length, fixes #608

This commit is contained in:
Konstantin Haase 2013-02-26 16:24:15 +11:00
parent 0adaa4635c
commit a1f4fa9cee
2 changed files with 4 additions and 0 deletions

View file

@ -83,6 +83,9 @@
* Fix mixed indentation for private methods. (Robin Dupret)
* Recalculate Content-Length even if hard coded if body is reset. Relevant
mostly for error handlers. (Nathan Esquenazi, Konstantin Haase)
* Take views option into account for template caching. (Konstantin Haase)
= 1.3.5 / 2013-02-25

View file

@ -211,6 +211,7 @@ module Sinatra
def block.each; yield(call) end
response.body = block
elsif value
headers.delete 'Content-Length' unless request.head?
response.body = value
else
response.body