Skip to content

http: keep HTTP/1.1 conns alive even if the Connection header is removed

Previously persistence was completed disabled if you removed this header, which is not correct for modern HTTP, where the header is optional and all connections should persist by default regardless. See #46321 (closed) for more context.

This header is required to enable keep alive for HTTP/1.0 and older. This PR doesn't explicitly check the version, but the shouldKeepAlive variable that's used here is set by the HTTP parser, which does check this (among other conditions) and there's a test here to confirm that.

As noted in #46321 (closed), we should test this for ecosystem impact, since this incorrect default dates back to 2012 and it may be relied on elsewhere.

Fixes #46321 (closed)

Merge request reports

Loading