diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-10-05 18:46:21 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-10-05 18:46:21 +0400 |
commit | a257367813cc604e9a8012cb64936a96b3a169cc (patch) | |
tree | f85d61c240f4d0ec775e6fb68709a902b9137111 /src/http/ngx_http_core_module.c | |
parent | c6806be34feef0bb4a9611338ed3a0b6f886111c (diff) |
nginx-0.2.6-RELEASE importrelease-0.2.6
*) Change: while using load-balancing the time before the failed
backend retry was decreased from 60 to 10 seconds.
*) Change: the "proxy_pass_unparsed_uri" was canceled, the original URI
now passed, if the URI part is omitted in "proxy_pass" directive.
*) Feature: the "error_page" directive supports redirects and allows
more flexible to change an error code.
*) Change: the charset in the "Content-Type" header line now is ignored
in proxied subrequests.
*) Bugfix: if the URI was changed in the "if" block and request did not
found new configuration, then the ngx_http_rewrite_module rules ran
again.
*) Bugfix: if the "set" directive set the ngx_http_geo_module variable
in some configuration part, the this variable was not available in
other configuration parts and the "using uninitialized variable"
error was occurred; the bug had appeared in 0.2.2.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index c07e367a0..0643a87fd 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -626,6 +626,11 @@ ngx_http_find_location_config(ngx_http_request_t *r) return NGX_HTTP_NOT_FOUND; } + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "using configuration \"%s%V\"", + (clcf->noname ? "*" : (clcf->exact_match ? "=" : "")), + &clcf->name); + ngx_http_update_location_config(r); ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, @@ -708,7 +713,8 @@ ngx_http_core_find_location(ngx_http_request_t *r, ngx_uint_t i, found, noregex; ngx_http_core_loc_conf_t *clcf, **clcfp; - ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "find location"); + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "find location for \"%V\"", &r->uri); found = 0; noregex = 0; @@ -907,7 +913,7 @@ ngx_http_set_content_type(ngx_http_request_t *r) ngx_int_t ngx_http_send_header(ngx_http_request_t *r) { - if (r->err_ctx) { + if (r->err_status) { r->headers_out.status = r->err_status; r->headers_out.status_line.len = 0; } @@ -2237,18 +2243,23 @@ ngx_http_core_error_page(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) return NGX_CONF_ERROR; } - overwrite = ngx_atoi(&value[i].data[1], value[i].len - 1); + if (value[i].len > 1) { + overwrite = ngx_atoi(&value[i].data[1], value[i].len - 1); - if (overwrite == NGX_ERROR) { - ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "invalid value \"%V\"", &value[i]); - return NGX_CONF_ERROR; + if (overwrite == NGX_ERROR) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "invalid value \"%V\"", &value[i]); + return NGX_CONF_ERROR; + } + + } else { + overwrite = 0; } n = 2; } else { - overwrite = 0; + overwrite = -1; n = 1; } @@ -2273,7 +2284,8 @@ ngx_http_core_error_page(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) return NGX_CONF_ERROR; } - err->overwrite = overwrite; + err->overwrite = (overwrite >= 0) ? overwrite : err->status; + err->uri = value[cf->args->nelts - 1]; } |