mirror of
https://github.com/nginx/nginx.git
synced 2025-08-01 11:16:14 +08:00
fix: "return" always overrode "error_page" response code
This commit is contained in:
parent
4c7f511364
commit
97c7e1a986
@ -178,9 +178,13 @@ ngx_http_rewrite_handler(ngx_http_request_t *r)
|
|||||||
code(e);
|
code(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (r->err_status == 0) {
|
||||||
return e->status;
|
return e->status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return r->err_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static ngx_int_t
|
static ngx_int_t
|
||||||
ngx_http_rewrite_var(ngx_http_request_t *r, ngx_http_variable_value_t *v,
|
ngx_http_rewrite_var(ngx_http_request_t *r, ngx_http_variable_value_t *v,
|
||||||
|
Loading…
Reference in New Issue
Block a user