When a WSGI application does not return sufficient content to satisfy the attached Content-Length header, the connection is closed to prevent the client from needlessly waiting. However, HTTP HEAD requests can set a Content-Length header without any content in the body. #7 removed a warning that was incorrectly displayed when this occurs, but the connection was still being closed. As demonstrated in #427, this abrupt close can cause client-side failures. Here, the connection is no longer closed for HEAD requests with Content-Length set, which resolves the linked issue.
Closes https://github.com/Pylons/waitress/issues/427
When a WSGI application does not return sufficient content to satisfy the attached
Content-Length
header, the connection is closed to prevent the client from needlessly waiting. However, HTTP HEAD requests can set aContent-Length
header without any content in the body. #7 removed a warning that was incorrectly displayed when this occurs, but the connection was still being closed. As demonstrated in #427, this abrupt close can cause client-side failures. Here, the connection is no longer closed for HEAD requests withContent-Length
set, which resolves the linked issue.