Mercurial > hg > nginx-vendor-current
comparison src/http/ngx_http_upstream.c @ 630:ad6fee8052d7 NGINX_1_0_5
nginx 1.0.5
*) Change: now default SSL ciphers are "HIGH:!aNULL:!MD5".
Thanks to Rob Stradling.
*) Feature: the "referer_hash_max_size" and "referer_hash_bucket_size"
directives.
Thanks to Witold Filipczyk.
*) Feature: $uid_reset variable.
*) Bugfix: a segmentation fault might occur in a worker process, if a
caching was used.
Thanks to Lanshun Zhou.
*) Bugfix: worker processes may got caught in an endless loop during
reconfiguration, if a caching was used; the bug had appeared in
0.8.48.
Thanks to Maxim Dounin.
*) Bugfix: "stalled cache updating" alert.
Thanks to Maxim Dounin.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 19 Jul 2011 00:00:00 +0400 |
parents | 83b58b182b76 |
children | 5b73504dd4ba |
comparison
equal
deleted
inserted
replaced
629:1c167244d2fd | 630:ad6fee8052d7 |
---|---|
659 | 659 |
660 /* TODO: add keys */ | 660 /* TODO: add keys */ |
661 | 661 |
662 ngx_http_file_cache_create_key(r); | 662 ngx_http_file_cache_create_key(r); |
663 | 663 |
664 if (r->cache->header_start >= u->conf->buffer_size) { | |
665 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | |
666 "cache key too large, increase upstream buffer size %uz", | |
667 u->conf->buffer_size); | |
668 | |
669 r->cache = NULL; | |
670 return NGX_DECLINED; | |
671 } | |
672 | |
664 switch (ngx_http_test_predicates(r, u->conf->cache_bypass)) { | 673 switch (ngx_http_test_predicates(r, u->conf->cache_bypass)) { |
665 | 674 |
666 case NGX_ERROR: | 675 case NGX_ERROR: |
667 return NGX_ERROR; | 676 return NGX_ERROR; |
668 | 677 |
2029 r->read_event_handler = ngx_http_request_empty_handler; | 2038 r->read_event_handler = ngx_http_request_empty_handler; |
2030 r->write_event_handler = ngx_http_request_empty_handler; | 2039 r->write_event_handler = ngx_http_request_empty_handler; |
2031 c->error = 1; | 2040 c->error = 1; |
2032 | 2041 |
2033 } else { | 2042 } else { |
2034 | |
2035 #if (NGX_HTTP_CACHE) | |
2036 | |
2037 if (r->cache) { | |
2038 ngx_http_file_cache_free(r->cache, u->pipe->temp_file); | |
2039 } | |
2040 | |
2041 #endif | |
2042 | |
2043 ngx_http_upstream_finalize_request(r, u, rc); | 2043 ngx_http_upstream_finalize_request(r, u, rc); |
2044 return; | 2044 return; |
2045 } | 2045 } |
2046 } | 2046 } |
2047 | 2047 |
2989 u->pipe->temp_file->file.fd); | 2989 u->pipe->temp_file->file.fd); |
2990 } | 2990 } |
2991 | 2991 |
2992 #if (NGX_HTTP_CACHE) | 2992 #if (NGX_HTTP_CACHE) |
2993 | 2993 |
2994 if (u->cacheable && r->cache) { | 2994 if (r->cache) { |
2995 time_t valid; | 2995 |
2996 | 2996 if (u->cacheable) { |
2997 if (rc == NGX_HTTP_BAD_GATEWAY || rc == NGX_HTTP_GATEWAY_TIME_OUT) { | 2997 |
2998 | 2998 if (rc == NGX_HTTP_BAD_GATEWAY || rc == NGX_HTTP_GATEWAY_TIME_OUT) { |
2999 valid = ngx_http_file_cache_valid(u->conf->cache_valid, rc); | 2999 time_t valid; |
3000 | 3000 |
3001 if (valid) { | 3001 valid = ngx_http_file_cache_valid(u->conf->cache_valid, rc); |
3002 r->cache->valid_sec = ngx_time() + valid; | 3002 |
3003 r->cache->error = rc; | 3003 if (valid) { |
3004 r->cache->valid_sec = ngx_time() + valid; | |
3005 r->cache->error = rc; | |
3006 } | |
3004 } | 3007 } |
3005 } | 3008 } |
3006 | 3009 |
3007 ngx_http_file_cache_free(r->cache, u->pipe->temp_file); | 3010 ngx_http_file_cache_free(r->cache, u->pipe->temp_file); |
3008 } | 3011 } |