Mercurial > hg > nginx
changeset 6079:8e56f649fd0d stable-1.6
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 28 Nov 2014 16:57:50 +0300 |
parents | 7ea6f5140ed9 |
children | 4296627f385a |
files | src/http/ngx_http_core_module.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Fri Nov 21 22:51:49 2014 +0300 +++ b/src/http/ngx_http_core_module.c Fri Nov 28 16:57:50 2014 +0300 @@ -1935,6 +1935,10 @@ 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");