我已经观察到,无论keepalive设置如何,只要响应代码为400,我们的apache httpd服务器都会返回Connection: close
。可以修改此行为,还是在任何地方进行记录?我能找到的最接近的文档是here:
IF
we have not marked this connection as errored;
and
the client isn't expecting 100-continue
and
the response status does not require a close;
and
the response body has a defined length due to the status code being 304 or 204, the request method being HEAD, already having defined Content-Length or Transfer-Encoding: chunked, or the request version being HTTP/1.1 and thus capable of being set as chunked
THEN
we support keepalive.
关键行是and the response status does not require a close;
。