Welcome! Log In Create A New Profile

Advanced

[nginx] Perl: avoid redirects on errors.

Maxim Dounin
July 12, 2019 10:56AM
details: https://hg.nginx.org/nginx/rev/d758d04e0790
branches:
changeset: 7529:d758d04e0790
user: Maxim Dounin <mdounin@mdounin.ru>
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
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Perl: avoid redirects on errors.

Maxim Dounin 160 July 12, 2019 10:56AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 304
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready