From 12d6b3b4a1d024bd8098e20b43b0b7020e5286e6 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Fri, 12 Jul 2019 15:38:27 +0300 Subject: Perl: avoid redirects on errors. Previously, redirects scheduled with $r->internal_redirect() were followed even if the code then died. Now these are ignored and nginx will return an error instead. --- src/http/modules/perl/ngx_http_perl_module.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/http/modules/perl/ngx_http_perl_module.c') diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index a383e9002..81b2526ad 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -778,6 +778,8 @@ ngx_http_perl_call_handler(pTHX_ ngx_http_request_t *r, return NGX_ERROR; } + ctx->redirect_uri.len = 0; + return NGX_HTTP_INTERNAL_SERVER_ERROR; } -- cgit v1.2.3