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.
This commit is contained in:
Maxim Dounin 2019-07-12 15:38:27 +03:00
parent cae2e68908
commit 12d6b3b4a1

View File

@ -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;
}