Avoid sending the terminating chunk in case it's a HEAD request.

This commit is contained in:
Jack Kuan
2014-12-19 23:44:55 -10:00
parent 9b490340e5
commit 39af574e7f

View File

@@ -1854,7 +1854,7 @@ class WSGIWorker(Worker):
# Send headers if the body was empty
self.send_headers('', sections)
if self.chunked:
if self.chunked and self.request_method != 'HEAD':
# If chunked, send our final chunk length
self.conn.sendall(b('0\r\n\r\n'))