changeset 7529:d758d04e0790

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 12 Jul 2019 15:38:27 +0300
parents 0cb693b4cbbb
children fd9252844ec1
files src/http/modules/perl/ngx_http_perl_module.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
     }