comparison src/http/modules/ngx_http_fastcgi_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
350 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, 350 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
351 ngx_conf_set_bitmask_slot, 351 ngx_conf_set_bitmask_slot,
352 NGX_HTTP_LOC_CONF_OFFSET, 352 NGX_HTTP_LOC_CONF_OFFSET,
353 offsetof(ngx_http_fastcgi_loc_conf_t, upstream.cache_use_stale), 353 offsetof(ngx_http_fastcgi_loc_conf_t, upstream.cache_use_stale),
354 &ngx_http_fastcgi_next_upstream_masks }, 354 &ngx_http_fastcgi_next_upstream_masks },
355
356 { ngx_string("fastcgi_cache_methods"),
357 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
358 ngx_conf_set_bitmask_slot,
359 NGX_HTTP_LOC_CONF_OFFSET,
360 offsetof(ngx_http_fastcgi_loc_conf_t, upstream.cache_methods),
361 &ngx_http_upstream_cache_method_mask },
355 362
356 #endif 363 #endif
357 364
358 { ngx_string("fastcgi_temp_path"), 365 { ngx_string("fastcgi_temp_path"),
359 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, 366 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234,
1833 * set by ngx_pcalloc(): 1840 * set by ngx_pcalloc():
1834 * 1841 *
1835 * conf->upstream.bufs.num = 0; 1842 * conf->upstream.bufs.num = 0;
1836 * conf->upstream.ignore_headers = 0; 1843 * conf->upstream.ignore_headers = 0;
1837 * conf->upstream.next_upstream = 0; 1844 * conf->upstream.next_upstream = 0;
1838 * conf->upstream.use_stale_cache = 0; 1845 * conf->upstream.cache_use_stale = 0;
1846 * conf->upstream.cache_methods = 0;
1839 * conf->upstream.temp_path = NULL; 1847 * conf->upstream.temp_path = NULL;
1840 * conf->upstream.hide_headers_hash = { NULL, 0 }; 1848 * conf->upstream.hide_headers_hash = { NULL, 0 };
1841 * conf->upstream.uri = { 0, NULL }; 1849 * conf->upstream.uri = { 0, NULL };
1842 * conf->upstream.location = NULL; 1850 * conf->upstream.location = NULL;
1843 * conf->upstream.store_lengths = NULL; 1851 * conf->upstream.store_lengths = NULL;
2081 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { 2089 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) {
2082 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET 2090 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET
2083 |NGX_HTTP_UPSTREAM_FT_OFF; 2091 |NGX_HTTP_UPSTREAM_FT_OFF;
2084 } 2092 }
2085 2093
2094 if (conf->upstream.cache_methods == 0) {
2095 conf->upstream.cache_methods = prev->upstream.cache_methods;
2096 }
2097
2098 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD;
2099
2086 ngx_conf_merge_ptr_value(conf->upstream.cache_valid, 2100 ngx_conf_merge_ptr_value(conf->upstream.cache_valid,
2087 prev->upstream.cache_valid, NULL); 2101 prev->upstream.cache_valid, NULL);
2088 2102
2089 if (conf->cache_key.value.data == NULL) { 2103 if (conf->cache_key.value.data == NULL) {
2090 conf->cache_key = prev->cache_key; 2104 conf->cache_key = prev->cache_key;