Mercurial > hg > nginx-vendor-current
comparison src/http/ngx_http_upstream.c @ 642:d3cf6c6b0043 NGINX_1_1_5
nginx 1.1.5
*) Feature: the "uwsgi_buffering" and "scgi_buffering" directives.
Thanks to Peter Smit.
*) Bugfix: non-cacheable responses might be cached if
"proxy_cache_bypass" directive was used.
Thanks to John Ferlito.
*) Bugfix: in HTTP/1.1 support in the ngx_http_proxy_module.
*) Bugfix: cached responses with an empty body were returned
incorrectly; the bug had appeared in 0.8.31.
*) Bugfix: 201 responses of the ngx_http_dav_module were incorrect; the
bug had appeared in 0.8.32.
*) Bugfix: in the "return" directive.
*) Bugfix: the "ssl_session_cache builtin" directive caused segmentation
fault; the bug had appeared in 1.1.1.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 05 Oct 2011 00:00:00 +0400 |
parents | eb208e0cf44d |
children | 6f21ae02fb01 |
comparison
equal
deleted
inserted
replaced
641:6c19b251b926 | 642:d3cf6c6b0043 |
---|---|
681 | 681 |
682 r->cache = NULL; | 682 r->cache = NULL; |
683 return NGX_DECLINED; | 683 return NGX_DECLINED; |
684 } | 684 } |
685 | 685 |
686 u->cacheable = 1; | |
687 | |
686 switch (ngx_http_test_predicates(r, u->conf->cache_bypass)) { | 688 switch (ngx_http_test_predicates(r, u->conf->cache_bypass)) { |
687 | 689 |
688 case NGX_ERROR: | 690 case NGX_ERROR: |
689 return NGX_ERROR; | 691 return NGX_ERROR; |
690 | 692 |
693 return NGX_DECLINED; | 695 return NGX_DECLINED; |
694 | 696 |
695 default: /* NGX_OK */ | 697 default: /* NGX_OK */ |
696 break; | 698 break; |
697 } | 699 } |
698 | |
699 u->cacheable = 1; | |
700 | 700 |
701 c = r->cache; | 701 c = r->cache; |
702 | 702 |
703 c->min_uses = u->conf->cache_min_uses; | 703 c->min_uses = u->conf->cache_min_uses; |
704 c->body_start = u->conf->buffer_size; | 704 c->body_start = u->conf->buffer_size; |
2179 | 2179 |
2180 if (ngx_http_file_cache_create(r) != NGX_OK) { | 2180 if (ngx_http_file_cache_create(r) != NGX_OK) { |
2181 ngx_http_upstream_finalize_request(r, u, 0); | 2181 ngx_http_upstream_finalize_request(r, u, 0); |
2182 return; | 2182 return; |
2183 } | 2183 } |
2184 | |
2185 u->cacheable = 1; | |
2186 } | 2184 } |
2187 | 2185 |
2188 break; | 2186 break; |
2189 } | 2187 } |
2190 | 2188 |
2925 if (u->peer.connection->pool) { | 2923 if (u->peer.connection->pool) { |
2926 ngx_destroy_pool(u->peer.connection->pool); | 2924 ngx_destroy_pool(u->peer.connection->pool); |
2927 } | 2925 } |
2928 | 2926 |
2929 ngx_close_connection(u->peer.connection); | 2927 ngx_close_connection(u->peer.connection); |
2928 u->peer.connection = NULL; | |
2930 } | 2929 } |
2931 | 2930 |
2932 #if 0 | 2931 #if 0 |
2933 if (u->conf->busy_lock && !u->busy_locked) { | 2932 if (u->conf->busy_lock && !u->busy_locked) { |
2934 ngx_http_upstream_busy_lock(p); | 2933 ngx_http_upstream_busy_lock(p); |
3069 return; | 3068 return; |
3070 } | 3069 } |
3071 | 3070 |
3072 r->connection->log->action = "sending to client"; | 3071 r->connection->log->action = "sending to client"; |
3073 | 3072 |
3074 if (rc == 0) { | 3073 if (rc == 0 |
3074 #if (NGX_HTTP_CACHE) | |
3075 && !r->cached | |
3076 #endif | |
3077 ) | |
3078 { | |
3075 rc = ngx_http_send_special(r, NGX_HTTP_LAST); | 3079 rc = ngx_http_send_special(r, NGX_HTTP_LAST); |
3076 } | 3080 } |
3077 | 3081 |
3078 ngx_http_finalize_request(r, rc); | 3082 ngx_http_finalize_request(r, rc); |
3079 } | 3083 } |
4327 && uscfp[i]->default_port != u->default_port) | 4331 && uscfp[i]->default_port != u->default_port) |
4328 { | 4332 { |
4329 continue; | 4333 continue; |
4330 } | 4334 } |
4331 | 4335 |
4336 if (flags & NGX_HTTP_UPSTREAM_CREATE) { | |
4337 uscfp[i]->flags = flags; | |
4338 } | |
4339 | |
4332 return uscfp[i]; | 4340 return uscfp[i]; |
4333 } | 4341 } |
4334 | 4342 |
4335 uscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_upstream_srv_conf_t)); | 4343 uscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_upstream_srv_conf_t)); |
4336 if (uscf == NULL) { | 4344 if (uscf == NULL) { |