mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #35051 -- Prevented runserver from removing non-zero Content-Length for HEAD requests.
This commit is contained in:
@@ -134,6 +134,7 @@ class ServerHandler(simple_server.ServerHandler):
|
||||
if (
|
||||
self.environ["REQUEST_METHOD"] == "HEAD"
|
||||
and "Content-Length" in self.headers
|
||||
and str(self.headers["Content-Length"]) == "0"
|
||||
):
|
||||
del self.headers["Content-Length"]
|
||||
# HTTP/1.1 requires support for persistent connections. Send 'close' if
|
||||
|
||||
Reference in New Issue
Block a user