aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/perl/ngx_http_perl_module.h
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2019-07-12 11:29:22 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2019-07-12 11:29:22 +0300
commiteae5e4dd01dfaff9d15c3dd7818f082e2995cc74 (patch)
treea443f9c4a055c38b4155bc9376ee30c4b9578fb3 /src/http/modules/perl/ngx_http_perl_module.h
parent60e7480533480b6340cae596118aa0ac72c0fce9 (diff)
downloadnginx-eae5e4dd01dfaff9d15c3dd7818f082e2995cc74.tar.gz
nginx-eae5e4dd01dfaff9d15c3dd7818f082e2995cc74.zip
Perl: reworked perl module to pass ctx instead of request.
This ensures that correct ctx is always available, including after filter finalization. In particular, this fixes a segmentation fault with the following configuration: location / { image_filter test; perl 'sub { my $r = shift; $r->send_http_header(); $r->print("foo\n"); $r->print("bar\n"); }'; } This also seems to be the only way to correctly handle filter finalization in various complex cases, for example, when embedded perl is used both in the original handler and in an error page called after filter finalization.
Diffstat (limited to 'src/http/modules/perl/ngx_http_perl_module.h')
-rw-r--r--src/http/modules/perl/ngx_http_perl_module.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/http/modules/perl/ngx_http_perl_module.h b/src/http/modules/perl/ngx_http_perl_module.h
index 5e60b031e..4f1eaa3a2 100644
--- a/src/http/modules/perl/ngx_http_perl_module.h
+++ b/src/http/modules/perl/ngx_http_perl_module.h
@@ -21,6 +21,8 @@
typedef ngx_http_request_t *nginx;
typedef struct {
+ ngx_http_request_t *request;
+
ngx_str_t filename;
ngx_str_t redirect_uri;
ngx_str_t redirect_args;