comparison src/http/modules/ngx_http_proxy_module.c @ 494:499474178a11 NGINX_0_7_59

nginx 0.7.59 *) Feature: the "proxy_cache_methods" and "fastcgi_cache_methods" directives. *) Bugfix: socket leak; the bug had appeared in 0.7.25. Thanks to Maxim Dounin. *) Bugfix: a segmentation fault occurred in worker process, if a request had no body and the $request_body variable was used; the bug had appeared in 0.7.58. *) Bugfix: the SSL modules might not built on Solaris and Linux; the bug had appeared in 0.7.58. *) Bugfix: ngx_http_xslt_filter_module responses were not handled by SSI, charset, and gzip filters. *) Bugfix: a "charset" directive did not set a charset to ngx_http_gzip_static_module responses.
author Igor Sysoev <http://sysoev.ru>
date Mon, 25 May 2009 00:00:00 +0400
parents ed5e10fb40fc
children f39b9e29530d
comparison
equal deleted inserted replaced
493:d13d7ebf1370 494:499474178a11
374 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, 374 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
375 ngx_conf_set_bitmask_slot, 375 ngx_conf_set_bitmask_slot,
376 NGX_HTTP_LOC_CONF_OFFSET, 376 NGX_HTTP_LOC_CONF_OFFSET,
377 offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_use_stale), 377 offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_use_stale),
378 &ngx_http_proxy_next_upstream_masks }, 378 &ngx_http_proxy_next_upstream_masks },
379
380 { ngx_string("proxy_cache_methods"),
381 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
382 ngx_conf_set_bitmask_slot,
383 NGX_HTTP_LOC_CONF_OFFSET,
384 offsetof(ngx_http_proxy_loc_conf_t, upstream.cache_methods),
385 &ngx_http_upstream_cache_method_mask },
379 386
380 #endif 387 #endif
381 388
382 { ngx_string("proxy_temp_path"), 389 { ngx_string("proxy_temp_path"),
383 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, 390 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234,
1883 * set by ngx_pcalloc(): 1890 * set by ngx_pcalloc():
1884 * 1891 *
1885 * conf->upstream.bufs.num = 0; 1892 * conf->upstream.bufs.num = 0;
1886 * conf->upstream.ignore_headers = 0; 1893 * conf->upstream.ignore_headers = 0;
1887 * conf->upstream.next_upstream = 0; 1894 * conf->upstream.next_upstream = 0;
1888 * conf->upstream.use_stale_cache = 0; 1895 * conf->upstream.cache_use_stale = 0;
1896 * conf->upstream.cache_methods = 0;
1889 * conf->upstream.temp_path = NULL; 1897 * conf->upstream.temp_path = NULL;
1890 * conf->upstream.hide_headers_hash = { NULL, 0 }; 1898 * conf->upstream.hide_headers_hash = { NULL, 0 };
1891 * conf->upstream.uri = { 0, NULL }; 1899 * conf->upstream.uri = { 0, NULL };
1892 * conf->upstream.location = NULL; 1900 * conf->upstream.location = NULL;
1893 * conf->upstream.store_lengths = NULL; 1901 * conf->upstream.store_lengths = NULL;
2137 ngx_conf_merge_bitmask_value(conf->upstream.cache_use_stale, 2145 ngx_conf_merge_bitmask_value(conf->upstream.cache_use_stale,
2138 prev->upstream.cache_use_stale, 2146 prev->upstream.cache_use_stale,
2139 (NGX_CONF_BITMASK_SET 2147 (NGX_CONF_BITMASK_SET
2140 |NGX_HTTP_UPSTREAM_FT_OFF)); 2148 |NGX_HTTP_UPSTREAM_FT_OFF));
2141 2149
2150 if (conf->upstream.cache_methods == 0) {
2151 conf->upstream.cache_methods = prev->upstream.cache_methods;
2152 }
2153
2154 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD;
2155
2142 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { 2156 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) {
2143 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET 2157 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET
2144 |NGX_HTTP_UPSTREAM_FT_OFF; 2158 |NGX_HTTP_UPSTREAM_FT_OFF;
2145 } 2159 }
2146 2160