Welcome! Log In Create A New Profile

Advanced

[nginx] Perl: disabled not_modified filter (ticket #1786).

Maxim Dounin
June 17, 2019 02:40PM
details: https://hg.nginx.org/nginx/rev/36c52a0f6ded
branches:
changeset: 7516:36c52a0f6ded
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon Jun 17 19:48:56 2019 +0300
description:
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.

diffstat:

src/http/modules/perl/nginx.xs | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs
--- a/src/http/modules/perl/nginx.xs
+++ b/src/http/modules/perl/nginx.xs
@@ -147,6 +147,8 @@ send_http_header(r, ...)
}
}

+ r->disable_not_modified = 1;
+
(void) ngx_http_send_header(r);


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Perl: disabled not_modified filter (ticket #1786).

Maxim Dounin 305 June 17, 2019 02:40PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 143
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready