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_upstream.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_upstream.c')
-rw-r--r-- | src/http/ngx_http_upstream.c | 56 |
1 files changed, 1 insertions, 55 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 647d9d20a..dd32f639c 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -1793,8 +1793,6 @@ static u_char * ngx_http_upstream_log_error(ngx_http_request_t *r, u_char *buf, size_t len) { u_char *p; - ngx_str_t line; - uintptr_t escape; ngx_http_upstream_t *u; ngx_peer_connection_t *peer; @@ -1809,62 +1807,10 @@ ngx_http_upstream_log_error(ngx_http_request_t *r, u_char *buf, size_t len) &u->conf->schema, &peer->peers->peer[peer->cur_peer].name, peer->peers->peer[peer->cur_peer].uri_separator, - &u->conf->uri); + &u->uri); len -= p - buf; buf = p; - if (r->quoted_uri) { - escape = 2 * ngx_escape_uri(NULL, r->uri.data + u->conf->location->len, - r->uri.len - u->conf->location->len, - NGX_ESCAPE_URI); - } else { - escape = 0; - } - - if (escape) { - if (len >= r->uri.len - u->conf->location->len + escape) { - - ngx_escape_uri(buf, r->uri.data + u->conf->location->len, - r->uri.len - u->conf->location->len, NGX_ESCAPE_URI); - - buf += r->uri.len - u->conf->location->len + escape; - len -= r->uri.len - u->conf->location->len + escape; - - } else { - p = ngx_palloc(r->pool, - r->uri.len - u->conf->location->len + escape); - if (p == NULL) { - return buf; - } - - ngx_escape_uri(p, r->uri.data + u->conf->location->len, - r->uri.len - u->conf->location->len, NGX_ESCAPE_URI); - - line.len = len; - line.data = p; - - return ngx_snprintf(buf, len, "%V", &line); - } - - } else { - line.len = r->uri.len - u->conf->location->len; - if (line.len > len) { - line.len = len; - } - - line.data = r->uri.data + u->conf->location->len; - p = ngx_snprintf(buf, len, "%V", &line); - - len -= p - buf; - buf = p; - } - - if (r->args.len) { - p = ngx_snprintf(buf, len, "?%V", &r->args); - len -= p - buf; - buf = p; - } - return ngx_http_log_error_info(r, buf, len); } |