Mercurial > hg > nginx
comparison src/http/modules/ngx_http_scgi_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 | 1d4c7aaed5d2 |
children | 045ea40cbfe8 |
comparison
equal
deleted
inserted
replaced
3669:1f5841b1fcd7 | 3670:2728c4e4a9ae |
---|---|
334 ngx_null_string | 334 ngx_null_string |
335 }; | 335 }; |
336 | 336 |
337 | 337 |
338 #if (NGX_HTTP_CACHE) | 338 #if (NGX_HTTP_CACHE) |
339 | |
340 static ngx_str_t ngx_http_scgi_hide_cache_headers[] = { | |
341 ngx_string("Status"), | |
342 ngx_string("X-Accel-Expires"), | |
343 ngx_string("X-Accel-Redirect"), | |
344 ngx_string("X-Accel-Limit-Rate"), | |
345 ngx_string("X-Accel-Buffering"), | |
346 ngx_string("X-Accel-Charset"), | |
347 ngx_string("Set-Cookie"), | |
348 ngx_string("P3P"), | |
349 ngx_null_string | |
350 }; | |
351 | |
352 | 339 |
353 static ngx_keyval_t ngx_http_scgi_cache_headers[] = { | 340 static ngx_keyval_t ngx_http_scgi_cache_headers[] = { |
354 { ngx_string("HTTP_IF_MODIFIED_SINCE"), ngx_string("") }, | 341 { ngx_string("HTTP_IF_MODIFIED_SINCE"), ngx_string("") }, |
355 { ngx_string("HTTP_IF_UNMODIFIED_SINCE"), ngx_string("") }, | 342 { ngx_string("HTTP_IF_UNMODIFIED_SINCE"), ngx_string("") }, |
356 { ngx_string("HTTP_IF_NONE_MATCH"), ngx_string("") }, | 343 { ngx_string("HTTP_IF_NONE_MATCH"), ngx_string("") }, |
1050 ngx_http_scgi_loc_conf_t *conf = child; | 1037 ngx_http_scgi_loc_conf_t *conf = child; |
1051 | 1038 |
1052 u_char *p; | 1039 u_char *p; |
1053 size_t size; | 1040 size_t size; |
1054 uintptr_t *code; | 1041 uintptr_t *code; |
1055 ngx_str_t *hide; | |
1056 ngx_uint_t i; | 1042 ngx_uint_t i; |
1057 ngx_array_t headers_names; | 1043 ngx_array_t headers_names; |
1058 ngx_keyval_t *src; | 1044 ngx_keyval_t *src; |
1059 ngx_hash_key_t *hk; | 1045 ngx_hash_key_t *hk; |
1060 ngx_hash_init_t hash; | 1046 ngx_hash_init_t hash; |
1269 | 1255 |
1270 hash.max_size = 512; | 1256 hash.max_size = 512; |
1271 hash.bucket_size = ngx_align(64, ngx_cacheline_size); | 1257 hash.bucket_size = ngx_align(64, ngx_cacheline_size); |
1272 hash.name = "scgi_hide_headers_hash"; | 1258 hash.name = "scgi_hide_headers_hash"; |
1273 | 1259 |
1274 #if (NGX_HTTP_CACHE) | |
1275 | |
1276 hide = conf->upstream.cache ? ngx_http_scgi_hide_cache_headers: | |
1277 ngx_http_scgi_hide_headers; | |
1278 #else | |
1279 | |
1280 hide = ngx_http_scgi_hide_headers; | |
1281 | |
1282 #endif | |
1283 | |
1284 if (ngx_http_upstream_hide_headers_hash(cf, &conf->upstream, | 1260 if (ngx_http_upstream_hide_headers_hash(cf, &conf->upstream, |
1285 &prev->upstream, hide, &hash) | 1261 &prev->upstream, ngx_http_scgi_hide_headers, &hash) |
1286 != NGX_OK) | 1262 != NGX_OK) |
1287 { | 1263 { |
1288 return NGX_CONF_ERROR; | 1264 return NGX_CONF_ERROR; |
1289 } | 1265 } |
1290 | 1266 |