comparison src/http/ngx_http_upstream.c @ 2944:f892042956e3 stable-0.7

merge r2895, r2896, r2926, r2927, r2928, r2930, and r2936: various proxy/fastcgi cache features and fixes: *) report about proxy/fastcgi_store and proxy/fastcgi_cache incompatibility *) delete useless r->cache->uses *) proxy_cache_use_stale/fastcgi_cache_use_stale updating *) inherit proxy_set_header, proxy_hide_header, and fastcgi_hide_header only if cache settings are similar *) add response file uniq while loading cold cache on demand
author Igor Sysoev <igor@sysoev.ru>
date Mon, 15 Jun 2009 09:30:59 +0000
parents 896db5a09bd2
children 31526449835f
comparison
equal deleted inserted replaced
2943:5da043342fe4 2944:f892042956e3
575 c->body_start = u->conf->buffer_size; 575 c->body_start = u->conf->buffer_size;
576 c->file_cache = u->conf->cache->data; 576 c->file_cache = u->conf->cache->data;
577 577
578 rc = ngx_http_file_cache_open(r); 578 rc = ngx_http_file_cache_open(r);
579 579
580 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 580 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
581 "http upstream cache: %i u:%ui", rc, c->uses); 581 "http upstream cache: %i", rc);
582
583 if (rc == NGX_HTTP_CACHE_UPDATING) {
584 if (u->conf->cache_use_stale & NGX_HTTP_UPSTREAM_FT_UPDATING) {
585 rc = NGX_OK;
586
587 } else {
588 rc = NGX_HTTP_CACHE_STALE;
589 }
590 }
582 591
583 if (rc == NGX_OK) { 592 if (rc == NGX_OK) {
584 593
585 rc = ngx_http_upstream_cache_send(r, u); 594 rc = ngx_http_upstream_cache_send(r, u);
586 595
4074 if (conf->hide_headers == NGX_CONF_UNSET_PTR 4083 if (conf->hide_headers == NGX_CONF_UNSET_PTR
4075 && conf->pass_headers == NGX_CONF_UNSET_PTR) 4084 && conf->pass_headers == NGX_CONF_UNSET_PTR)
4076 { 4085 {
4077 conf->hide_headers_hash = prev->hide_headers_hash; 4086 conf->hide_headers_hash = prev->hide_headers_hash;
4078 4087
4079 if (conf->hide_headers_hash.buckets) { 4088 if (conf->hide_headers_hash.buckets
4089 && ((conf->cache == NULL) == (prev->cache == NULL)))
4090 {
4080 return NGX_OK; 4091 return NGX_OK;
4081 } 4092 }
4082 4093
4083 conf->hide_headers = prev->hide_headers; 4094 conf->hide_headers = prev->hide_headers;
4084 conf->pass_headers = prev->pass_headers; 4095 conf->pass_headers = prev->pass_headers;