details:   https://hg.nginx.org/nginx/rev/d758d04e0790
branches:  
changeset: 7529:d758d04e0790
user:      Maxim Dounin <[email protected]>
date:      Fri Jul 12 15:38:27 2019 +0300
description:
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.

diffstat:

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

diffs (12 lines):

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;
     }
 
_______________________________________________
nginx-devel mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Reply via email to