comparison src/http/modules/ngx_http_proxy_module.c @ 592:09d5f308901f NGINX_0_8_48

nginx 0.8.48 *) Change: now the "server_name" directive default value is an empty name "". Thanks to Gena Makhomed. *) Change: now the "server_name_in_redirect" directive default value is "off". *) Feature: the $geoip_dma_code, $geoip_area_code, and $geoip_region_name variables. Thanks to Christine McGonagle. *) Bugfix: the "proxy_pass", "fastcgi_pass", "uwsgi_pass", and "scgi_pass" directives were not inherited inside "limit_except" blocks. *) Bugfix: the "proxy_cache_min_uses", "fastcgi_cache_min_uses" "uwsgi_cache_min_uses", and "scgi_cache_min_uses" directives did not work; the bug had appeared in 0.8.46. *) Bugfix: the "fastcgi_split_path_info" directive used incorrectly captures, if only parts of an URI were captured. Thanks to Yuriy Taraday and Frank Enderle. *) Bugfix: the "rewrite" directive did not escape a ";" character during copying from URI to query string. Thanks to Daisuke Murase. *) Bugfix: the ngx_http_image_filter_module closed a connection, if an image was larger than "image_filter_buffer" size.
author Igor Sysoev <http://sysoev.ru>
date Tue, 03 Aug 2010 00:00:00 +0400
parents b6a5942a4e6a
children bb20316269e4
comparison
equal deleted inserted replaced
591:8b891ad58d6a 592:09d5f308901f
317 NULL }, 317 NULL },
318 318
319 #if (NGX_HTTP_CACHE) 319 #if (NGX_HTTP_CACHE)
320 320
321 { ngx_string("proxy_cache"), 321 { ngx_string("proxy_cache"),
322 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, 322 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
323 ngx_http_proxy_cache, 323 ngx_http_proxy_cache,
324 NGX_HTTP_LOC_CONF_OFFSET, 324 NGX_HTTP_LOC_CONF_OFFSET,
325 0, 325 0,
326 NULL }, 326 NULL },
327 327
328 { ngx_string("proxy_cache_key"), 328 { ngx_string("proxy_cache_key"),
329 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, 329 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
330 ngx_http_proxy_cache_key, 330 ngx_http_proxy_cache_key,
331 NGX_HTTP_LOC_CONF_OFFSET, 331 NGX_HTTP_LOC_CONF_OFFSET,
332 0, 332 0,
333 NULL }, 333 NULL },
334 334
410 NGX_HTTP_LOC_CONF_OFFSET, 410 NGX_HTTP_LOC_CONF_OFFSET,
411 offsetof(ngx_http_proxy_loc_conf_t, upstream.next_upstream), 411 offsetof(ngx_http_proxy_loc_conf_t, upstream.next_upstream),
412 &ngx_http_proxy_next_upstream_masks }, 412 &ngx_http_proxy_next_upstream_masks },
413 413
414 { ngx_string("proxy_pass_header"), 414 { ngx_string("proxy_pass_header"),
415 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, 415 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
416 ngx_conf_set_str_array_slot, 416 ngx_conf_set_str_array_slot,
417 NGX_HTTP_LOC_CONF_OFFSET, 417 NGX_HTTP_LOC_CONF_OFFSET,
418 offsetof(ngx_http_proxy_loc_conf_t, upstream.pass_headers), 418 offsetof(ngx_http_proxy_loc_conf_t, upstream.pass_headers),
419 NULL }, 419 NULL },
420 420
421 { ngx_string("proxy_hide_header"), 421 { ngx_string("proxy_hide_header"),
422 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, 422 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
423 ngx_conf_set_str_array_slot, 423 ngx_conf_set_str_array_slot,
424 NGX_HTTP_LOC_CONF_OFFSET, 424 NGX_HTTP_LOC_CONF_OFFSET,
425 offsetof(ngx_http_proxy_loc_conf_t, upstream.hide_headers), 425 offsetof(ngx_http_proxy_loc_conf_t, upstream.hide_headers),
426 NULL }, 426 NULL },
427 427
570 570
571 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); 571 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module);
572 572
573 u = r->upstream; 573 u = r->upstream;
574 574
575 if (plcf->proxy_lengths == 0) { 575 if (plcf->proxy_lengths == NULL) {
576 ctx->vars = plcf->vars; 576 ctx->vars = plcf->vars;
577 u->schema = plcf->vars.schema; 577 u->schema = plcf->vars.schema;
578 #if (NGX_HTTP_SSL) 578 #if (NGX_HTTP_SSL)
579 u->ssl = (plcf->upstream.ssl != NULL); 579 u->ssl = (plcf->upstream.ssl != NULL);
580 #endif 580 #endif
1718 ngx_http_proxy_loc_conf_t *conf = child; 1718 ngx_http_proxy_loc_conf_t *conf = child;
1719 1719
1720 size_t size; 1720 size_t size;
1721 ngx_keyval_t *s; 1721 ngx_keyval_t *s;
1722 ngx_hash_init_t hash; 1722 ngx_hash_init_t hash;
1723 ngx_http_core_loc_conf_t *clcf;
1723 ngx_http_proxy_redirect_t *pr; 1724 ngx_http_proxy_redirect_t *pr;
1724 ngx_http_script_compile_t sc; 1725 ngx_http_script_compile_t sc;
1725 1726
1726 if (conf->upstream.store != 0) { 1727 if (conf->upstream.store != 0) {
1727 ngx_conf_merge_value(conf->upstream.store, 1728 ngx_conf_merge_value(conf->upstream.store,
1983 ngx_str_null(&pr->replacement.text); 1984 ngx_str_null(&pr->replacement.text);
1984 } 1985 }
1985 } 1986 }
1986 } 1987 }
1987 1988
1988 /* STUB */
1989 if (prev->proxy_lengths) {
1990 conf->proxy_lengths = prev->proxy_lengths;
1991 conf->proxy_values = prev->proxy_values;
1992 }
1993
1994 #if (NGX_HTTP_SSL) 1989 #if (NGX_HTTP_SSL)
1995 if (conf->upstream.ssl == NULL) { 1990 if (conf->upstream.ssl == NULL) {
1996 conf->upstream.ssl = prev->upstream.ssl; 1991 conf->upstream.ssl = prev->upstream.ssl;
1997 } 1992 }
1998 #endif 1993 #endif
2020 if (conf->upstream.upstream == NULL) { 2015 if (conf->upstream.upstream == NULL) {
2021 conf->upstream.upstream = prev->upstream.upstream; 2016 conf->upstream.upstream = prev->upstream.upstream;
2022 conf->vars = prev->vars; 2017 conf->vars = prev->vars;
2023 } 2018 }
2024 2019
2020 if (conf->proxy_lengths == NULL) {
2021 conf->proxy_lengths = prev->proxy_lengths;
2022 conf->proxy_values = prev->proxy_values;
2023 }
2024
2025 if (conf->upstream.upstream || conf->proxy_lengths) {
2026 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
2027 if (clcf->handler == NULL && clcf->lmt_excpt) {
2028 clcf->handler = ngx_http_proxy_handler;
2029 conf->location = prev->location;
2030 }
2031 }
2025 2032
2026 if (conf->body_source.data == NULL) { 2033 if (conf->body_source.data == NULL) {
2027 conf->body_source = prev->body_source; 2034 conf->body_source = prev->body_source;
2028 conf->body_set_len = prev->body_set_len; 2035 conf->body_set_len = prev->body_set_len;
2029 conf->body_set = prev->body_set; 2036 conf->body_set = prev->body_set;