summaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index c04c6f9d6..a5ebf1292 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1595,7 +1595,11 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
rc = r->post_subrequest->handler(r, r->post_subrequest->data, rc);
}
- if (rc == NGX_ERROR || rc == NGX_HTTP_REQUEST_TIME_OUT || c->error) {
+ if (rc == NGX_ERROR
+ || rc == NGX_HTTP_REQUEST_TIME_OUT
+ || rc == NGX_HTTP_CLIENT_CLOSED_REQUEST
+ || c->error)
+ {
if (rc > 0 && r->headers_out.status == 0) {
r->headers_out.status = rc;
}
@@ -1677,8 +1681,8 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
}
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
- "http fast subrequest: \"%V?%V\" done",
- &r->uri, &r->args);
+ "http fast subrequest: \"%V?%V\" done",
+ &r->uri, &r->args);
return;
}
@@ -2112,6 +2116,12 @@ ngx_http_set_keepalive(ngx_http_request_t *r)
hc->nbusy = 0;
}
+#if (NGX_HTTP_SSL)
+ if (c->ssl) {
+ ngx_ssl_free_buffer(c);
+ }
+#endif
+
rev->handler = ngx_http_keepalive_handler;
if (wev->active && (ngx_event_flags & NGX_USE_LEVEL_EVENT)) {