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:
parent
0adaa4635c
commit
a1f4fa9cee
2 changed files with 4 additions and 0 deletions
3
CHANGES
3
CHANGES
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue