comparison src/http/modules/perl/nginx.xs @ 7516:36c52a0f6ded

Perl: disabled not_modified filter (ticket #1786). Embedded perl does not set any request fields needed for conditional requests processing. Further, filter finalization in the not_modified filter can cause segmentation faults due to cleared ctx as in ticket #1786. Before 5fb1e57c758a (1.7.3) the not_modified filter was implicitly disabled for perl responses, as r->headers_out.last_modified_time was -1. This change restores this behaviour by using the explicit r->disable_not_modified flag. Note that this patch doesn't try to address perl module robustness against filter finalization and other errors returned from filter chains. It should be eventually reworked to handle errors instead of ignoring them.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 17 Jun 2019 19:48:56 +0300
parents 0cdee26605f3
children deebe988cbd7
comparison
equal deleted inserted replaced
7515:2db68852d6a0 7516:36c52a0f6ded
144 } else { 144 } else {
145 if (ngx_http_set_content_type(r) != NGX_OK) { 145 if (ngx_http_set_content_type(r) != NGX_OK) {
146 XSRETURN_EMPTY; 146 XSRETURN_EMPTY;
147 } 147 }
148 } 148 }
149
150 r->disable_not_modified = 1;
149 151
150 (void) ngx_http_send_header(r); 152 (void) ngx_http_send_header(r);
151 153
152 154
153 void 155 void