1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Allows to suppress the Content-Length: header which send_status normally adds, by calling send_status(nil).

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@550 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
filipe 2007-08-14 02:16:17 +00:00
parent a891276e2c
commit f58ea237f6

View file

@ -444,7 +444,7 @@ module Mongrel
def send_status(content_length=@body.length) def send_status(content_length=@body.length)
if not @status_sent if not @status_sent
@header['Content-Length'] = content_length unless @status == 304 @header['Content-Length'] = content_length if content_length and @status != 304
write(Const::STATUS_FORMAT % [@status, HTTP_STATUS_CODES[@status]]) write(Const::STATUS_FORMAT % [@status, HTTP_STATUS_CODES[@status]])
@status_sent = true @status_sent = true
end end