Mercurial > hg > nginx-vendor-current
comparison src/http/modules/ngx_http_proxy_module.c @ 656:9d21dad0b5a1 NGINX_1_1_12
nginx 1.1.12
*) Change: a "proxy_pass" directive without URI part now uses changed
URI after redirection with the "error_page" directive;
Thanks to Lanshun Zhou.
*) Feature: the "proxy/fastcgi/scgi/uwsgi_cache_lock",
"proxy/fastcgi/scgi/uwsgi_cache_lock_timeout" directives.
*) Feature: the "pcre_jit" directive.
*) Feature: the "if" SSI command supports captures in regular
expressions.
*) Bugfix: the "if" SSI command did not work inside the "block" command.
*) Bugfix: the "limit_conn_log_level" and "limit_req_log_level"
directives might not work.
*) Bugfix: the "limit_rate" directive did not allow to use full
throughput, even if limit value was very high.
*) Bugfix: the "sendfile_max_chunk" directive did not work, if the
"limit_rate" directive was used.
*) Bugfix: a "proxy_pass" directive without URI part always used
original request URI if variables were used.
*) Bugfix: a "proxy_pass" directive without URI part might use original
request after redirection with the "try_files" directive;
Thanks to Lanshun Zhou.
*) Bugfix: in the ngx_http_scgi_module.
*) Bugfix: in the ngx_http_mp4_module.
*) Bugfix: nginx could not be built on Solaris; the bug had appeared in
1.1.9.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 26 Dec 2011 00:00:00 +0400 |
parents | 753f505670e0 |
children | 5a4401b9551b |
comparison
equal
deleted
inserted
replaced
655:189afff6503f | 656:9d21dad0b5a1 |
---|---|
400 ngx_conf_set_bitmask_slot, | 400 ngx_conf_set_bitmask_slot, |
401 NGX_HTTP_LOC_CONF_OFFSET, | 401 NGX_HTTP_LOC_CONF_OFFSET, |
402 offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_methods), | 402 offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_methods), |
403 &ngx_http_upstream_cache_method_mask }, | 403 &ngx_http_upstream_cache_method_mask }, |
404 | 404 |
405 { ngx_string("proxy_cache_lock"), | |
406 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | |
407 ngx_conf_set_flag_slot, | |
408 NGX_HTTP_LOC_CONF_OFFSET, | |
409 offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_lock), | |
410 NULL }, | |
411 | |
412 { ngx_string("proxy_cache_lock_timeout"), | |
413 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, | |
414 ngx_conf_set_msec_slot, | |
415 NGX_HTTP_LOC_CONF_OFFSET, | |
416 offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_lock_timeout), | |
417 NULL }, | |
418 | |
405 #endif | 419 #endif |
406 | 420 |
407 { ngx_string("proxy_temp_path"), | 421 { ngx_string("proxy_temp_path"), |
408 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, | 422 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, |
409 ngx_conf_set_path_slot, | 423 ngx_conf_set_path_slot, |
734 ngx_memcpy(p, url.uri.data, url.uri.len); | 748 ngx_memcpy(p, url.uri.data, url.uri.len); |
735 | 749 |
736 url.uri.len++; | 750 url.uri.len++; |
737 url.uri.data = p - 1; | 751 url.uri.data = p - 1; |
738 } | 752 } |
739 | |
740 } else { | |
741 url.uri = r->unparsed_uri; | |
742 } | 753 } |
743 | 754 |
744 ctx->vars.key_start = u->schema; | 755 ctx->vars.key_start = u->schema; |
745 | 756 |
746 ngx_http_proxy_set_vars(&url, &ctx->vars); | 757 ngx_http_proxy_set_vars(&url, &ctx->vars); |
804 key = ngx_array_push(&r->cache->keys); | 815 key = ngx_array_push(&r->cache->keys); |
805 if (key == NULL) { | 816 if (key == NULL) { |
806 return NGX_ERROR; | 817 return NGX_ERROR; |
807 } | 818 } |
808 | 819 |
809 if (plcf->proxy_lengths) { | 820 if (plcf->proxy_lengths && ctx->vars.uri.len) { |
810 | 821 |
811 *key = ctx->vars.uri; | 822 *key = ctx->vars.uri; |
812 u->uri = ctx->vars.uri; | 823 u->uri = ctx->vars.uri; |
813 | 824 |
814 return NGX_OK; | 825 return NGX_OK; |
914 | 925 |
915 escape = 0; | 926 escape = 0; |
916 loc_len = 0; | 927 loc_len = 0; |
917 unparsed_uri = 0; | 928 unparsed_uri = 0; |
918 | 929 |
919 if (plcf->proxy_lengths) { | 930 if (plcf->proxy_lengths && ctx->vars.uri.len) { |
920 uri_len = ctx->vars.uri.len; | 931 uri_len = ctx->vars.uri.len; |
921 | 932 |
922 } else if (ctx->vars.uri.len == 0 && r->valid_unparsed_uri && r == r->main) | 933 } else if (ctx->vars.uri.len == 0 && r->valid_unparsed_uri && r == r->main) |
923 { | 934 { |
924 unparsed_uri = 1; | 935 unparsed_uri = 1; |
1020 | 1031 |
1021 b->last = ngx_copy(b->last, method.data, method.len); | 1032 b->last = ngx_copy(b->last, method.data, method.len); |
1022 | 1033 |
1023 u->uri.data = b->last; | 1034 u->uri.data = b->last; |
1024 | 1035 |
1025 if (plcf->proxy_lengths) { | 1036 if (plcf->proxy_lengths && ctx->vars.uri.len) { |
1026 b->last = ngx_copy(b->last, ctx->vars.uri.data, ctx->vars.uri.len); | 1037 b->last = ngx_copy(b->last, ctx->vars.uri.data, ctx->vars.uri.len); |
1027 | 1038 |
1028 } else if (unparsed_uri) { | 1039 } else if (unparsed_uri) { |
1029 b->last = ngx_copy(b->last, r->unparsed_uri.data, r->unparsed_uri.len); | 1040 b->last = ngx_copy(b->last, r->unparsed_uri.data, r->unparsed_uri.len); |
1030 | 1041 |
2436 conf->upstream.cache = NGX_CONF_UNSET_PTR; | 2447 conf->upstream.cache = NGX_CONF_UNSET_PTR; |
2437 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; | 2448 conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT; |
2438 conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR; | 2449 conf->upstream.cache_bypass = NGX_CONF_UNSET_PTR; |
2439 conf->upstream.no_cache = NGX_CONF_UNSET_PTR; | 2450 conf->upstream.no_cache = NGX_CONF_UNSET_PTR; |
2440 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; | 2451 conf->upstream.cache_valid = NGX_CONF_UNSET_PTR; |
2452 conf->upstream.cache_lock = NGX_CONF_UNSET; | |
2453 conf->upstream.cache_lock_timeout = NGX_CONF_UNSET_MSEC; | |
2441 #endif | 2454 #endif |
2442 | 2455 |
2443 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR; | 2456 conf->upstream.hide_headers = NGX_CONF_UNSET_PTR; |
2444 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR; | 2457 conf->upstream.pass_headers = NGX_CONF_UNSET_PTR; |
2445 | 2458 |
2681 prev->upstream.cache_valid, NULL); | 2694 prev->upstream.cache_valid, NULL); |
2682 | 2695 |
2683 if (conf->cache_key.value.data == NULL) { | 2696 if (conf->cache_key.value.data == NULL) { |
2684 conf->cache_key = prev->cache_key; | 2697 conf->cache_key = prev->cache_key; |
2685 } | 2698 } |
2699 | |
2700 ngx_conf_merge_value(conf->upstream.cache_lock, | |
2701 prev->upstream.cache_lock, 0); | |
2702 | |
2703 ngx_conf_merge_msec_value(conf->upstream.cache_lock_timeout, | |
2704 prev->upstream.cache_lock_timeout, 5000); | |
2686 | 2705 |
2687 #endif | 2706 #endif |
2688 | 2707 |
2689 if (conf->method.len == 0) { | 2708 if (conf->method.len == 0) { |
2690 conf->method = prev->method; | 2709 conf->method = prev->method; |