mirror of
https://github.com/nginx/nginx.git
synced 2025-08-06 06:46:16 +08:00
fix r2590: error_page made an external redirect without query string
This commit is contained in:
parent
74732dded2
commit
64851bb2ae
@ -3875,7 +3875,7 @@ ngx_http_core_error_page(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
args.len = 0;
|
||||
args.data = NULL;
|
||||
|
||||
if (cv.lengths == NULL) {
|
||||
if (cv.lengths == NULL && uri.data[0] == '/') {
|
||||
p = (u_char *) ngx_strchr(uri.data, '?');
|
||||
|
||||
if (p) {
|
||||
|
@ -451,6 +451,8 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (uri.data[0] == '/') {
|
||||
|
||||
if (err_page->value.lengths) {
|
||||
ngx_http_split_args(r, &uri, &args);
|
||||
|
||||
@ -458,8 +460,6 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
|
||||
args = err_page->args;
|
||||
}
|
||||
|
||||
if (uri.data[0] == '/') {
|
||||
|
||||
if (r->method != NGX_HTTP_HEAD) {
|
||||
r->method = NGX_HTTP_GET;
|
||||
r->method_name = ngx_http_get_name;
|
||||
|
Loading…
Reference in New Issue
Block a user