aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_special_response.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r--src/http/ngx_http_special_response.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 9e3bb9ae3..736211654 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -199,15 +199,19 @@ int ngx_http_special_response_handler(ngx_http_request_t *r, int error)
}
rc = ngx_http_send_header(r);
+
if (rc == NGX_ERROR) {
return NGX_ERROR;
}
if (r->header_only) {
+ ngx_http_finalize_request(r, rc);
+#if 0
if (rc == NGX_AGAIN) {
ngx_http_set_write_handler(r);
return NGX_AGAIN;
}
+#endif
return NGX_OK;
}
@@ -248,12 +252,16 @@ int ngx_http_special_response_handler(ngx_http_request_t *r, int error)
rc = ngx_http_output_filter(r, h);
+ ngx_http_finalize_request(r, rc);
+
+#if 0
if (r->main == NULL) {
if (rc == NGX_AGAIN) {
ngx_http_set_write_handler(r);
return NGX_AGAIN;
}
}
+#endif
return NGX_OK;