Fix bug when responses have no body.

Thanks to Chris Dent for noticing this.
This commit is contained in:
Paul J. Davis 2010-04-01 16:28:09 -04:00
parent fc3c53500e
commit ff47d22488
2 changed files with 3 additions and 0 deletions

1
THANKS
View File

@ -9,3 +9,4 @@ Eric Florenzano <floguy@gmail.com>
Johan Bergström <bugs@bergstroem.nu>
Xavier Grangier <grangier@gmail.com>
Sergey Shepelev <temotor@gmail.com>
Chris Dent <chris.dent@gmail.com>

View File

@ -53,5 +53,7 @@ class Response(object):
write(self.req.socket, arg, self.chunked)
def close(self):
if not self.headers_sent:
self.send_headers()
if self.chunked:
write_chunk(self.socket, "")