summaryrefslogtreecommitdiffhomepage
path: root/src/http
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/http/modules/proxy/ngx_http_proxy_handler.c1
-rw-r--r--src/http/ngx_http_request.c2
-rw-r--r--src/http/ngx_http_special_response.c6
3 files changed, 8 insertions, 1 deletions
diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.c b/src/http/modules/proxy/ngx_http_proxy_handler.c
index ae6d5d148..0bb3cce40 100644
--- a/src/http/modules/proxy/ngx_http_proxy_handler.c
+++ b/src/http/modules/proxy/ngx_http_proxy_handler.c
@@ -457,6 +457,7 @@ static void ngx_http_proxy_send_request(ngx_http_proxy_ctx_t *p)
return;
}
+ ngx_event_connect_peer_failed(&p->upstream);
ngx_http_proxy_close_connection(c);
}
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 9b8ac2786..e3a495234 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -629,7 +629,7 @@ static void ngx_http_process_request_headers(ngx_event_t *rev)
return;
}
- if (r->header_timeout_set) {
+ if (rev->timer_set) {
ngx_del_timer(rev);
}
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index ce6183e8b..035d4878f 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -157,6 +157,12 @@ int ngx_http_special_response_handler(ngx_http_request_t *r, int error)
ngx_chain_t *out, **ll, *cl;
ngx_http_core_loc_conf_t *clcf;
+ rc = ngx_http_discard_body(r);
+
+ if (rc != NGX_OK) {
+ return rc;
+ }
+
r->headers_out.status = error;
if (error < NGX_HTTP_BAD_REQUEST) {