Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_fastcgi_module.c @ 3670:2728c4e4a9ae
do not use a cache headers set to hide
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 02 Jul 2010 10:05:40 +0000 |
parents | 12bd9e26fadb |
children | 045ea40cbfe8 |
comparison
equal
deleted
inserted
replaced
3669:1f5841b1fcd7 | 3670:2728c4e4a9ae |
---|---|
512 ngx_null_string | 512 ngx_null_string |
513 }; | 513 }; |
514 | 514 |
515 | 515 |
516 #if (NGX_HTTP_CACHE) | 516 #if (NGX_HTTP_CACHE) |
517 | |
518 static ngx_str_t ngx_http_fastcgi_hide_cache_headers[] = { | |
519 ngx_string("Status"), | |
520 ngx_string("X-Accel-Expires"), | |
521 ngx_string("X-Accel-Redirect"), | |
522 ngx_string("X-Accel-Limit-Rate"), | |
523 ngx_string("X-Accel-Buffering"), | |
524 ngx_string("X-Accel-Charset"), | |
525 ngx_string("Set-Cookie"), | |
526 ngx_string("P3P"), | |
527 ngx_null_string | |
528 }; | |
529 | |
530 | 517 |
531 static ngx_keyval_t ngx_http_fastcgi_cache_headers[] = { | 518 static ngx_keyval_t ngx_http_fastcgi_cache_headers[] = { |
532 { ngx_string("HTTP_IF_MODIFIED_SINCE"), ngx_string("") }, | 519 { ngx_string("HTTP_IF_MODIFIED_SINCE"), ngx_string("") }, |
533 { ngx_string("HTTP_IF_UNMODIFIED_SINCE"), ngx_string("") }, | 520 { ngx_string("HTTP_IF_UNMODIFIED_SINCE"), ngx_string("") }, |
534 { ngx_string("HTTP_IF_NONE_MATCH"), ngx_string("") }, | 521 { ngx_string("HTTP_IF_NONE_MATCH"), ngx_string("") }, |
2023 ngx_http_fastcgi_loc_conf_t *conf = child; | 2010 ngx_http_fastcgi_loc_conf_t *conf = child; |
2024 | 2011 |
2025 u_char *p; | 2012 u_char *p; |
2026 size_t size; | 2013 size_t size; |
2027 uintptr_t *code; | 2014 uintptr_t *code; |
2028 ngx_str_t *hide; | |
2029 ngx_uint_t i; | 2015 ngx_uint_t i; |
2030 ngx_array_t headers_names; | 2016 ngx_array_t headers_names; |
2031 ngx_keyval_t *src; | 2017 ngx_keyval_t *src; |
2032 ngx_hash_key_t *hk; | 2018 ngx_hash_key_t *hk; |
2033 ngx_hash_init_t hash; | 2019 ngx_hash_init_t hash; |
2249 | 2235 |
2250 hash.max_size = 512; | 2236 hash.max_size = 512; |
2251 hash.bucket_size = ngx_align(64, ngx_cacheline_size); | 2237 hash.bucket_size = ngx_align(64, ngx_cacheline_size); |
2252 hash.name = "fastcgi_hide_headers_hash"; | 2238 hash.name = "fastcgi_hide_headers_hash"; |
2253 | 2239 |
2254 #if (NGX_HTTP_CACHE) | |
2255 | |
2256 hide = conf->upstream.cache ? ngx_http_fastcgi_hide_cache_headers: | |
2257 ngx_http_fastcgi_hide_headers; | |
2258 #else | |
2259 | |
2260 hide = ngx_http_fastcgi_hide_headers; | |
2261 | |
2262 #endif | |
2263 | |
2264 if (ngx_http_upstream_hide_headers_hash(cf, &conf->upstream, | 2240 if (ngx_http_upstream_hide_headers_hash(cf, &conf->upstream, |
2265 &prev->upstream, hide, &hash) | 2241 &prev->upstream, ngx_http_fastcgi_hide_headers, &hash) |
2266 != NGX_OK) | 2242 != NGX_OK) |
2267 { | 2243 { |
2268 return NGX_CONF_ERROR; | 2244 return NGX_CONF_ERROR; |
2269 } | 2245 } |
2270 | 2246 |