Mercurial > hg > nginx-vendor-1-0
comparison src/http/ngx_http_upstream.c @ 626:a7a5fa2e395b NGINX_1_0_3
nginx 1.0.3
*) Feature: the "auth_basic_user_file" directive supports "$apr1",
"{PLAIN}", and "{SSHA}" password encryption methods.
Thanks to Maxim Dounin.
*) Feature: the "geoip_org" directive and $geoip_org variable.
Thanks to Alexander Uskov, Arnaud Granal, and Denis F. Latypoff.
*) Feature: ngx_http_geo_module and ngx_http_geoip_module support IPv4
addresses mapped to IPv6 addresses.
*) Bugfix: a segmentation fault occurred in a worker process during
testing IPv4 address mapped to IPv6 address, if access or deny rules
were defined only for IPv6; the bug had appeared in 0.8.22.
*) Bugfix: a cached reponse may be broken if proxy/fastcgi/scgi/
uwsgi_cache_bypass and proxy/fastcgi/scgi/uwsgi_no_cache directive
values were different; the bug had appeared in 0.8.46.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 25 May 2011 00:00:00 +0400 |
parents | 8dc007eddbcf |
children | 83b58b182b76 |
comparison
equal
deleted
inserted
replaced
625:30f948276abe | 626:a7a5fa2e395b |
---|---|
639 | 639 |
640 c = r->cache; | 640 c = r->cache; |
641 | 641 |
642 if (c == NULL) { | 642 if (c == NULL) { |
643 | 643 |
644 if (!(r->method & u->conf->cache_methods)) { | |
645 return NGX_DECLINED; | |
646 } | |
647 | |
648 if (r->method & NGX_HTTP_HEAD) { | |
649 u->method = ngx_http_core_get_method; | |
650 } | |
651 | |
652 if (ngx_http_file_cache_new(r) != NGX_OK) { | |
653 return NGX_ERROR; | |
654 } | |
655 | |
656 if (u->create_key(r) != NGX_OK) { | |
657 return NGX_ERROR; | |
658 } | |
659 | |
660 /* TODO: add keys */ | |
661 | |
662 ngx_http_file_cache_create_key(r); | |
663 | |
644 switch (ngx_http_test_predicates(r, u->conf->cache_bypass)) { | 664 switch (ngx_http_test_predicates(r, u->conf->cache_bypass)) { |
645 | 665 |
646 case NGX_ERROR: | 666 case NGX_ERROR: |
647 return NGX_ERROR; | 667 return NGX_ERROR; |
648 | 668 |
651 return NGX_DECLINED; | 671 return NGX_DECLINED; |
652 | 672 |
653 default: /* NGX_OK */ | 673 default: /* NGX_OK */ |
654 break; | 674 break; |
655 } | 675 } |
656 | |
657 if (!(r->method & u->conf->cache_methods)) { | |
658 return NGX_DECLINED; | |
659 } | |
660 | |
661 if (r->method & NGX_HTTP_HEAD) { | |
662 u->method = ngx_http_core_get_method; | |
663 } | |
664 | |
665 if (ngx_http_file_cache_new(r) != NGX_OK) { | |
666 return NGX_ERROR; | |
667 } | |
668 | |
669 if (u->create_key(r) != NGX_OK) { | |
670 return NGX_ERROR; | |
671 } | |
672 | |
673 /* TODO: add keys */ | |
674 | |
675 ngx_http_file_cache_create_key(r); | |
676 | 676 |
677 u->cacheable = 1; | 677 u->cacheable = 1; |
678 | 678 |
679 c = r->cache; | 679 c = r->cache; |
680 | 680 |
2133 | 2133 |
2134 default: /* NGX_OK */ | 2134 default: /* NGX_OK */ |
2135 | 2135 |
2136 if (u->cache_status == NGX_HTTP_CACHE_BYPASS) { | 2136 if (u->cache_status == NGX_HTTP_CACHE_BYPASS) { |
2137 | 2137 |
2138 if (ngx_http_file_cache_new(r) != NGX_OK) { | |
2139 ngx_http_upstream_finalize_request(r, u, 0); | |
2140 return; | |
2141 } | |
2142 | |
2143 if (u->create_key(r) != NGX_OK) { | |
2144 ngx_http_upstream_finalize_request(r, u, 0); | |
2145 return; | |
2146 } | |
2147 | |
2148 /* TODO: add keys */ | |
2149 | |
2150 r->cache->min_uses = u->conf->cache_min_uses; | 2138 r->cache->min_uses = u->conf->cache_min_uses; |
2151 r->cache->body_start = u->conf->buffer_size; | 2139 r->cache->body_start = u->conf->buffer_size; |
2152 r->cache->file_cache = u->conf->cache->data; | 2140 r->cache->file_cache = u->conf->cache->data; |
2153 | 2141 |
2154 if (ngx_http_file_cache_create(r) != NGX_OK) { | 2142 if (ngx_http_file_cache_create(r) != NGX_OK) { |