comparison src/http/ngx_http_core_module.c @ 5925:c76d851c5e7a

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 51fe42cc7876
children ebdb2023e84a
comparison
equal deleted inserted replaced
5924:58956c644ad0 5925:c76d851c5e7a
1971 1971
1972 1972
1973 ngx_int_t 1973 ngx_int_t
1974 ngx_http_send_header(ngx_http_request_t *r) 1974 ngx_http_send_header(ngx_http_request_t *r)
1975 { 1975 {
1976 if (r->post_action) {
1977 return NGX_OK;
1978 }
1979
1976 if (r->header_sent) { 1980 if (r->header_sent) {
1977 ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, 1981 ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
1978 "header already sent"); 1982 "header already sent");
1979 return NGX_ERROR; 1983 return NGX_ERROR;
1980 } 1984 }