# HG changeset patch # User Maxim Dounin # Date 1562935107 -10800 # Node ID d758d04e07900e95dbe8d892a2580213ba01bd1a # Parent 0cb693b4cbbb3231c91d0b3f40e1a17472d6eed9 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. diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c --- 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_htt return NGX_ERROR; } + ctx->redirect_uri.len = 0; + return NGX_HTTP_INTERNAL_SERVER_ERROR; }