Mercurial > hg > nginx-vendor-current
comparison src/http/modules/ngx_http_proxy_module.c @ 658:5a4401b9551b NGINX_1_1_13
nginx 1.1.13
*) Feature: the "TLSv1.1" and "TLSv1.2" parameters of the
"ssl_protocols" directive.
*) Bugfix: the "limit_req" directive parameters were not inherited
correctly; the bug had appeared in 1.1.12.
*) Bugfix: the "proxy_redirect" directive incorrectly processed
"Refresh" header if regular expression were used.
*) Bugfix: the "proxy_cache_use_stale" directive with "error" parameter
did not return answer from cache if there were no live upstreams.
*) Bugfix: the "worker_cpu_affinity" directive might not work.
*) Bugfix: nginx could not be built on Solaris; the bug had appeared in
1.1.12.
*) Bugfix: in the ngx_http_mp4_module.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 16 Jan 2012 00:00:00 +0400 |
parents | 9d21dad0b5a1 |
children | d0f7a625f27c |
comparison
equal
deleted
inserted
replaced
657:e1296af53cc0 | 658:5a4401b9551b |
---|---|
2346 | 2346 |
2347 static ngx_int_t | 2347 static ngx_int_t |
2348 ngx_http_proxy_rewrite_redirect_regex(ngx_http_request_t *r, ngx_table_elt_t *h, | 2348 ngx_http_proxy_rewrite_redirect_regex(ngx_http_request_t *r, ngx_table_elt_t *h, |
2349 size_t prefix, ngx_http_proxy_redirect_t *pr) | 2349 size_t prefix, ngx_http_proxy_redirect_t *pr) |
2350 { | 2350 { |
2351 size_t len; | |
2352 u_char *data; | |
2351 ngx_str_t redirect, replacement; | 2353 ngx_str_t redirect, replacement; |
2352 | 2354 |
2353 redirect.len = h->value.len - prefix; | 2355 redirect.len = h->value.len - prefix; |
2354 redirect.data = h->value.data + prefix; | 2356 redirect.data = h->value.data + prefix; |
2355 | 2357 |
2359 | 2361 |
2360 if (ngx_http_complex_value(r, &pr->replacement, &replacement) != NGX_OK) { | 2362 if (ngx_http_complex_value(r, &pr->replacement, &replacement) != NGX_OK) { |
2361 return NGX_ERROR; | 2363 return NGX_ERROR; |
2362 } | 2364 } |
2363 | 2365 |
2364 h->value = replacement; | 2366 if (!prefix) { |
2367 h->value = replacement; | |
2368 return NGX_OK; | |
2369 } | |
2370 | |
2371 len = prefix + replacement.len; | |
2372 | |
2373 data = ngx_pnalloc(r->pool, len); | |
2374 if (data == NULL) { | |
2375 return NGX_ERROR; | |
2376 } | |
2377 | |
2378 ngx_memcpy(data, h->value.data, prefix); | |
2379 ngx_memcpy(data + prefix, replacement.data, replacement.len); | |
2380 | |
2381 h->value.len = len; | |
2382 h->value.data = data; | |
2365 | 2383 |
2366 return NGX_OK; | 2384 return NGX_OK; |
2367 } | 2385 } |
2368 | 2386 |
2369 #endif | 2387 #endif |
2665 ngx_conf_merge_bitmask_value(conf->upstream.cache_use_stale, | 2683 ngx_conf_merge_bitmask_value(conf->upstream.cache_use_stale, |
2666 prev->upstream.cache_use_stale, | 2684 prev->upstream.cache_use_stale, |
2667 (NGX_CONF_BITMASK_SET | 2685 (NGX_CONF_BITMASK_SET |
2668 |NGX_HTTP_UPSTREAM_FT_OFF)); | 2686 |NGX_HTTP_UPSTREAM_FT_OFF)); |
2669 | 2687 |
2670 if (conf->upstream.cache_methods == 0) { | |
2671 conf->upstream.cache_methods = prev->upstream.cache_methods; | |
2672 } | |
2673 | |
2674 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; | |
2675 | |
2676 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { | 2688 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { |
2677 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET | 2689 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET |
2678 |NGX_HTTP_UPSTREAM_FT_OFF; | 2690 |NGX_HTTP_UPSTREAM_FT_OFF; |
2679 } | 2691 } |
2692 | |
2693 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) { | |
2694 conf->upstream.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE; | |
2695 } | |
2696 | |
2697 if (conf->upstream.cache_methods == 0) { | |
2698 conf->upstream.cache_methods = prev->upstream.cache_methods; | |
2699 } | |
2700 | |
2701 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; | |
2680 | 2702 |
2681 ngx_conf_merge_ptr_value(conf->upstream.cache_bypass, | 2703 ngx_conf_merge_ptr_value(conf->upstream.cache_bypass, |
2682 prev->upstream.cache_bypass, NULL); | 2704 prev->upstream.cache_bypass, NULL); |
2683 | 2705 |
2684 ngx_conf_merge_ptr_value(conf->upstream.no_cache, | 2706 ngx_conf_merge_ptr_value(conf->upstream.no_cache, |
3578 } | 3600 } |
3579 | 3601 |
3580 plcf->upstream.ssl->log = cf->log; | 3602 plcf->upstream.ssl->log = cf->log; |
3581 | 3603 |
3582 if (ngx_ssl_create(plcf->upstream.ssl, | 3604 if (ngx_ssl_create(plcf->upstream.ssl, |
3583 NGX_SSL_SSLv2|NGX_SSL_SSLv3|NGX_SSL_TLSv1, NULL) | 3605 NGX_SSL_SSLv2|NGX_SSL_SSLv3|NGX_SSL_TLSv1 |
3606 |NGX_SSL_TLSv1_1|NGX_SSL_TLSv1_2, | |
3607 NULL) | |
3584 != NGX_OK) | 3608 != NGX_OK) |
3585 { | 3609 { |
3586 return NGX_ERROR; | 3610 return NGX_ERROR; |
3587 } | 3611 } |
3588 | 3612 |