diff options
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 6d20fdf7f..6d5bc0dd8 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -346,17 +346,17 @@ static void ngx_http_run_phases(ngx_http_request_t *r) continue; } - if (rc == NGX_AGAIN) { + if (rc >= NGX_HTTP_SPECIAL_RESPONSE || rc == NGX_ERROR) { + ngx_http_finalize_request(r, rc); return; } - if (rc >= NGX_HTTP_SPECIAL_RESPONSE || rc == NGX_ERROR) { + if (r->phase == NGX_HTTP_CONTENT_PHASE) { ngx_http_finalize_request(r, rc); return; } - if (rc == NGX_OK && r->phase == NGX_HTTP_CONTENT_PHASE) { - ngx_http_finalize_request(r, 0); + if (rc == NGX_AGAIN) { return; } |