allow to handle 301/302 in error_page

This commit is contained in:
Igor Sysoev 2009-12-23 15:31:16 +00:00
parent 3662f36a54
commit e146ebd813
2 changed files with 3 additions and 3 deletions

View File

@ -3900,9 +3900,9 @@ ngx_http_core_error_page(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return NGX_CONF_ERROR; 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, 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]); &value[i]);
return NGX_CONF_ERROR; return NGX_CONF_ERROR;
} }

View File

@ -1548,7 +1548,7 @@ ngx_http_upstream_process_header(ngx_http_request_t *r, ngx_http_upstream_t *u)
/* rc == NGX_OK */ /* 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) { if (r->subrequest_in_memory) {
u->buffer.last = u->buffer.pos; u->buffer.last = u->buffer.pos;