mirror of
https://github.com/nginx/nginx.git
synced 2025-01-23 23:03:18 -06:00
allow to handle 301/302 in error_page
This commit is contained in:
parent
3662f36a54
commit
e146ebd813
@ -3900,9 +3900,9 @@ ngx_http_core_error_page(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
|
||||
if (err->status < 400 || err->status > 599) {
|
||||
if (err->status < 300 || err->status > 599) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
"value \"%V\" must be between 400 and 599",
|
||||
"value \"%V\" must be between 300 and 599",
|
||||
&value[i]);
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
|
@ -1548,7 +1548,7 @@ ngx_http_upstream_process_header(ngx_http_request_t *r, ngx_http_upstream_t *u)
|
||||
|
||||
/* rc == NGX_OK */
|
||||
|
||||
if (u->headers_in.status_n >= NGX_HTTP_BAD_REQUEST) {
|
||||
if (u->headers_in.status_n > NGX_HTTP_SPECIAL_RESPONSE) {
|
||||
|
||||
if (r->subrequest_in_memory) {
|
||||
u->buffer.last = u->buffer.pos;
|
||||
|
Loading…
Reference in New Issue
Block a user