diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2019-07-12 15:38:27 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2019-07-12 15:38:27 +0300 |
commit | 12d6b3b4a1d024bd8098e20b43b0b7020e5286e6 (patch) | |
tree | 58404fd977b6bd74718d5143c3ce0539795bab19 /src/http/modules/perl/ngx_http_perl_module.c | |
parent | cae2e689083a04b2ddbb93bef5313b136080df65 (diff) | |
download | nginx-12d6b3b4a1d024bd8098e20b43b0b7020e5286e6.tar.gz nginx-12d6b3b4a1d024bd8098e20b43b0b7020e5286e6.zip |
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 (limited to 'src/http/modules/perl/ngx_http_perl_module.c')
-rw-r--r-- | src/http/modules/perl/ngx_http_perl_module.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |