Mercurial > hg > nginx-vendor-current
diff src/http/ngx_http_upstream.c @ 340:10cc350ed8a1 NGINX_0_6_14
nginx 0.6.14
*) Change: now by default the "echo" SSI command uses entity encoding.
*) Feature: the "encoding" parameter in the "echo" SSI command.
*) Feature: the "access_log" directive may be used inside the
"limit_except" block.
*) Bugfix: if all upstream servers were failed, then all servers had
got weight the was equal one until servers became alive; bug
appeared in 0.6.6.
*) Bugfix: a segmentation fault occurred in worker process if
$date_local and $date_gmt were used outside the
ngx_http_ssi_filter_module.
*) Bugfix: a segmentation fault might occur in worker process if debug
log was enabled.
Thanks to Andrei Nigmatulin.
*) Bugfix: ngx_http_memcached_module did not set
$upstream_response_time.
Thanks to Maxim Dounin.
*) Bugfix: a worker process may got caught in an endless loop, if the
memcached was used.
*) Bugfix: nginx supported low case only "close" and "keep-alive"
values in the "Connection" request header line; bug appeared in
0.6.11.
*) Bugfix: sub_filter did not work with empty substitution.
*) Bugfix: in sub_filter parsing.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 15 Oct 2007 00:00:00 +0400 |
parents | 1c519aff5c0c |
children | 05693816539c |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -434,7 +434,7 @@ ngx_http_upstream_check_broken_connectio ev->error = 1; } - if (!u->cachable && !u->store && u->peer.connection) { + if (!u->cacheable && !u->store && u->peer.connection) { ngx_log_error(NGX_LOG_INFO, ev->log, ev->kq_errno, "kevent() reported that client closed prematurely " "connection, so upstream connection is closed too"); @@ -500,7 +500,7 @@ ngx_http_upstream_check_broken_connectio ev->eof = 1; c->error = 1; - if (!u->cachable && !u->store && u->peer.connection) { + if (!u->cacheable && !u->store && u->peer.connection) { ngx_log_error(NGX_LOG_INFO, ev->log, err, "client closed prematurely connection, " "so upstream connection is closed too"); @@ -980,8 +980,7 @@ ngx_http_upstream_process_header(ngx_eve #endif } - n = u->peer.connection->recv(u->peer.connection, u->buffer.last, - u->buffer.end - u->buffer.last); + n = c->recv(c, u->buffer.last, u->buffer.end - u->buffer.last); if (n == NGX_AGAIN) { #if 0 @@ -1514,7 +1513,7 @@ ngx_http_upstream_send_response(ngx_http } } - if (u->cachable) { + if (u->cacheable) { header = (ngx_http_cache_header_t *) u->buffer->start; header->expires = u->cache->ctx.expires; @@ -1542,7 +1541,7 @@ ngx_http_upstream_send_response(ngx_http p->pool = r->pool; p->log = c->log; - p->cachable = u->cachable || u->store; + p->cacheable = u->cacheable || u->store; p->temp_file = ngx_pcalloc(r->pool, sizeof(ngx_temp_file_t)); if (p->temp_file == NULL) { @@ -1555,7 +1554,7 @@ ngx_http_upstream_send_response(ngx_http p->temp_file->path = u->conf->temp_path; p->temp_file->pool = r->pool; - if (u->cachable || u->store) { + if (u->cacheable || u->store) { p->temp_file->persistent = 1; } else { @@ -1579,7 +1578,7 @@ ngx_http_upstream_send_response(ngx_http p->preread_size = u->buffer.last - u->buffer.pos; - if (u->cachable) { + if (u->cacheable) { p->buf_to_file = ngx_calloc_buf(r->pool); if (p->buf_to_file == NULL) { @@ -1956,14 +1955,14 @@ ngx_http_upstream_process_body(ngx_event #if (NGX_HTTP_FILE_CACHE) - if (p->upstream_done && u->cachable) { + if (p->upstream_done && u->cacheable) { if (ngx_http_cache_update(r) == NGX_ERROR) { ngx_http_busy_unlock(u->conf->busy_lock, &u->busy_lock); ngx_http_upstream_finalize_request(r, u, 0); return; } - } else if (p->upstream_eof && u->cachable) { + } else if (p->upstream_eof && u->cacheable) { /* TODO: check length & update cache */ @@ -1991,7 +1990,7 @@ ngx_http_upstream_process_body(ngx_event ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http upstream downstream error"); - if (!u->cachable && u->peer.connection) { + if (!u->cacheable && u->peer.connection) { ngx_http_upstream_finalize_request(r, u, 0); } } @@ -2636,7 +2635,7 @@ ngx_http_upstream_rewrite_refresh(ngx_ht if (r->upstream->rewrite_redirect) { - p = (u_char *) ngx_strstr(ho->value.data, "url="); + p = ngx_strcasestrn(ho->value.data, "url=", 4 - 1); if (p) { rc = r->upstream->rewrite_redirect(r, ho, p + 4 - ho->value.data); @@ -2715,7 +2714,7 @@ ngx_http_upstream_addr_variable(ngx_http ngx_http_upstream_state_t *state; v->valid = 1; - v->no_cachable = 0; + v->no_cacheable = 0; v->not_found = 0; if (r->upstream_states == NULL || r->upstream_states->nelts == 0) { @@ -2786,7 +2785,7 @@ ngx_http_upstream_status_variable(ngx_ht ngx_http_upstream_state_t *state; v->valid = 1; - v->no_cachable = 0; + v->no_cacheable = 0; v->not_found = 0; if (r->upstream_states == NULL || r->upstream_states->nelts == 0) { @@ -2852,7 +2851,7 @@ ngx_http_upstream_response_time_variable ngx_http_upstream_state_t *state; v->valid = 1; - v->no_cachable = 0; + v->no_cacheable = 0; v->not_found = 0; if (r->upstream_states == NULL || r->upstream_states->nelts == 0) { @@ -3066,7 +3065,7 @@ ngx_http_upstream_server(ngx_conf_t *cf, u.url = value[1]; u.default_port = 80; - if (ngx_parse_url(cf, &u) != NGX_OK) { + if (ngx_parse_url(cf->pool, &u) != NGX_OK) { if (u.err) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%s in upstream \"%V\"", u.err, &u.url); @@ -3181,7 +3180,7 @@ ngx_http_upstream_add(ngx_conf_t *cf, ng if (!(flags & NGX_HTTP_UPSTREAM_CREATE)) { - if (ngx_parse_url(cf, u) != NGX_OK) { + if (ngx_parse_url(cf->pool, u) != NGX_OK) { if (u->err) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%s in upstream \"%V\"", u->err, &u->url);