aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2014-11-28 16:57:50 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2014-11-28 16:57:50 +0300
commit7fa89c744afd1f05f4405d9a60b8c63a65ea56cc (patch)
treed86d628420262af825826e404d6d4194d5c061a5 /src
parentd228fa5093e216465810c8a7b34284e84682622e (diff)
downloadnginx-7fa89c744afd1f05f4405d9a60b8c63a65ea56cc.tar.gz
nginx-7fa89c744afd1f05f4405d9a60b8c63a65ea56cc.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_core_module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 3b36f4a19..d8ff53bfe 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -1973,6 +1973,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");