summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorNick Kew <niq@apache.org>2009-12-08 11:22:56 +0100
committerNick Kew <niq@apache.org>2009-12-08 11:22:56 +0100
commit33b33d1987b590f014ab1ba1b2f17d8f0381d46c (patch)
tree8c4c3eba28cb17de1d7ca88896c53bf519c32cf3 /server
parentUpdates. (diff)
downloadapache2-33b33d1987b590f014ab1ba1b2f17d8f0381d46c.tar.xz
apache2-33b33d1987b590f014ab1ba1b2f17d8f0381d46c.zip
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
Diffstat (limited to 'server')
-rw-r--r--server/protocol.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/protocol.c b/server/protocol.c
index 1697a7d9fd..11040f32a7 100644
--- a/server/protocol.c
+++ b/server/protocol.c
@@ -1682,6 +1682,7 @@ AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
{
hdr_ptr x;
char *status_line = NULL;
+ request_rec *rr;
if (r->proto_num < 1001) {
/* don't send interim response to HTTP/1.0 Client */
@@ -1701,6 +1702,14 @@ AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
return;
}
+ /* if we send an interim response, we're no longer in a state of
+ * expecting one. Also, this could feasibly be in a subrequest,
+ * so we need to propagate the fact that we responded.
+ */
+ for (rr = r; rr != NULL; rr = rr->main) {
+ rr->expecting_100 = 0;
+ }
+
status_line = apr_pstrcat(r->pool, AP_SERVER_PROTOCOL, " ", r->status_line, CRLF, NULL);
ap_xlate_proto_to_ascii(status_line, strlen(status_line));