Avoid sending the terminating chunk in case it's a HEAD request.
This commit is contained in:
+1
-1
@@ -1854,7 +1854,7 @@ class WSGIWorker(Worker):
|
|||||||
# Send headers if the body was empty
|
# Send headers if the body was empty
|
||||||
self.send_headers('', sections)
|
self.send_headers('', sections)
|
||||||
|
|
||||||
if self.chunked:
|
if self.chunked and self.request_method != 'HEAD':
|
||||||
# If chunked, send our final chunk length
|
# If chunked, send our final chunk length
|
||||||
self.conn.sendall(b('0\r\n\r\n'))
|
self.conn.sendall(b('0\r\n\r\n'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user