diff options
Diffstat (limited to 'usr.sbin/httpd/src/main/http_request.c')
| -rw-r--r-- | usr.sbin/httpd/src/main/http_request.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.sbin/httpd/src/main/http_request.c b/usr.sbin/httpd/src/main/http_request.c index c0e27afb749..b936a6c083e 100644 --- a/usr.sbin/httpd/src/main/http_request.c +++ b/usr.sbin/httpd/src/main/http_request.c @@ -1117,7 +1117,15 @@ API_EXPORT(void) ap_die(int type, request_rec *r) * apache code, and continue with the usual REDIRECT handler. * But note that the client will ultimately see the wrong * status... + * + * Also, before updating r->status, we may need to ensure that + * the connection is dropped. For example, there may be + * unread request body that would confuse us if we try + * to read another request. */ + if (ap_status_drops_connection(r->status)) { + r->connection->keepalive = -1; + } r->status = REDIRECT; ap_table_setn(r->headers_out, "Location", custom_response); } |
