1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

Don't keepalive when we send a non-100 response while Client is expecting 100

and may be feeding us continuation data.
PR 47087


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@888310 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Kew
2009-12-08 10:22:56 +00:00
parent b310db9324
commit 33b33d1987
4 changed files with 24 additions and 0 deletions

View File

@@ -180,6 +180,9 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r)
* body should use the HTTP/1.1 chunked transfer-coding. In English,
*
* IF we have not marked this connection as errored;
* and the client isn't expecting 100-continue (PR47087 - more
* input here could be the client continuing when we're
* closing the request).
* 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
@@ -201,6 +204,7 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r)
* Note that the condition evaluation order is extremely important.
*/
if ((r->connection->keepalive != AP_CONN_CLOSE)
&& !r->expecting_100
&& ((r->status == HTTP_NOT_MODIFIED)
|| (r->status == HTTP_NO_CONTENT)
|| r->header_only