Skip to content

Commit

Permalink
Perl: avoid redirects on errors.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mdounin committed Jul 12, 2019
1 parent cae2e68 commit 12d6b3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/http/modules/perl/ngx_http_perl_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 12d6b3b

Please sign in to comment.