From: Maxim Dounin Date: Fri, 28 Nov 2014 13:57:50 +0000 (+0300) Subject: Fixed post_action to not trigger "header already sent" alert. X-Git-Tag: release-1.6.3~13 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=cb451bd6a46dd4b3053bc4ec2f667d4970c41665;p=nginx.git Fixed post_action to not trigger "header already sent" alert. The alert was introduced in 03ff14058272 (1.5.4), and was triggered on each post_action invocation. There is no real need to call header filters in case of post_action, so return NGX_OK from ngx_http_send_header() if r->post_action is set. --- diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 4484a5ed4..1bcd1045c 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1935,6 +1935,10 @@ ngx_http_send_response(ngx_http_request_t *r, ngx_uint_t status, ngx_int_t ngx_http_send_header(ngx_http_request_t *r) { + if (r->post_action) { + return NGX_OK; + } + if (r->header_sent) { ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, "header already sent");