Mercurial > hg > nginx-vendor-current
comparison src/http/modules/ngx_http_scgi_module.c @ 584:016632f0fb18 NGINX_0_8_44
nginx 0.8.44
*) Change: now nginx does not cache by default backend responses, if
they have a "Set-Cookie" header line.
*) Feature: the "listen" directive supports the "setfib" parameter.
Thanks to Andrew Filonov.
*) Bugfix: the "sub_filter" directive might change character case on
partial match.
*) Bugfix: compatibility with HP/UX.
*) Bugfix: compatibility with AIX xcl_r compiler.
*) Bugfix: nginx treated a large SSLv2 packets as plain requests.
Thanks to Miroslaw Jaworski.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 05 Jul 2010 00:00:00 +0400 |
parents | 4d3e880ce86c |
children | b6a5942a4e6a |
comparison
equal
deleted
inserted
replaced
583:39e50617266a | 584:016632f0fb18 |
---|---|
68 { ngx_string("off"), NGX_HTTP_UPSTREAM_FT_OFF }, | 68 { ngx_string("off"), NGX_HTTP_UPSTREAM_FT_OFF }, |
69 { ngx_null_string, 0 } | 69 { ngx_null_string, 0 } |
70 }; | 70 }; |
71 | 71 |
72 | 72 |
73 static ngx_conf_bitmask_t ngx_http_scgi_ignore_headers_masks[] = { | |
74 { ngx_string("X-Accel-Redirect"), NGX_HTTP_UPSTREAM_IGN_XA_REDIRECT }, | |
75 { ngx_string("X-Accel-Expires"), NGX_HTTP_UPSTREAM_IGN_XA_EXPIRES }, | |
76 { ngx_string("Expires"), NGX_HTTP_UPSTREAM_IGN_EXPIRES }, | |
77 { ngx_string("Cache-Control"), NGX_HTTP_UPSTREAM_IGN_CACHE_CONTROL }, | |
78 { ngx_null_string, 0 } | |
79 }; | |
80 | |
81 | |
82 ngx_module_t ngx_http_scgi_module; | 73 ngx_module_t ngx_http_scgi_module; |
83 | 74 |
84 | 75 |
85 static ngx_command_t ngx_http_scgi_commands[] = { | 76 static ngx_command_t ngx_http_scgi_commands[] = { |
86 | 77 |
294 { ngx_string("scgi_ignore_headers"), | 285 { ngx_string("scgi_ignore_headers"), |
295 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, | 286 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, |
296 ngx_conf_set_bitmask_slot, | 287 ngx_conf_set_bitmask_slot, |
297 NGX_HTTP_LOC_CONF_OFFSET, | 288 NGX_HTTP_LOC_CONF_OFFSET, |
298 offsetof(ngx_http_scgi_loc_conf_t, upstream.ignore_headers), | 289 offsetof(ngx_http_scgi_loc_conf_t, upstream.ignore_headers), |
299 &ngx_http_scgi_ignore_headers_masks }, | 290 &ngx_http_upstream_ignore_headers_masks }, |
300 | 291 |
301 ngx_null_command | 292 ngx_null_command |
302 }; | 293 }; |
303 | 294 |
304 | 295 |
343 ngx_null_string | 334 ngx_null_string |
344 }; | 335 }; |
345 | 336 |
346 | 337 |
347 #if (NGX_HTTP_CACHE) | 338 #if (NGX_HTTP_CACHE) |
348 | |
349 static ngx_str_t ngx_http_scgi_hide_cache_headers[] = { | |
350 ngx_string("Status"), | |
351 ngx_string("X-Accel-Expires"), | |
352 ngx_string("X-Accel-Redirect"), | |
353 ngx_string("X-Accel-Limit-Rate"), | |
354 ngx_string("X-Accel-Buffering"), | |
355 ngx_string("X-Accel-Charset"), | |
356 ngx_string("Set-Cookie"), | |
357 ngx_string("P3P"), | |
358 ngx_null_string | |
359 }; | |
360 | |
361 | 339 |
362 static ngx_keyval_t ngx_http_scgi_cache_headers[] = { | 340 static ngx_keyval_t ngx_http_scgi_cache_headers[] = { |
363 { ngx_string("HTTP_IF_MODIFIED_SINCE"), ngx_string("") }, | 341 { ngx_string("HTTP_IF_MODIFIED_SINCE"), ngx_string("") }, |
364 { ngx_string("HTTP_IF_UNMODIFIED_SINCE"), ngx_string("") }, | 342 { ngx_string("HTTP_IF_UNMODIFIED_SINCE"), ngx_string("") }, |
365 { ngx_string("HTTP_IF_NONE_MATCH"), ngx_string("") }, | 343 { ngx_string("HTTP_IF_NONE_MATCH"), ngx_string("") }, |
1059 ngx_http_scgi_loc_conf_t *conf = child; | 1037 ngx_http_scgi_loc_conf_t *conf = child; |
1060 | 1038 |
1061 u_char *p; | 1039 u_char *p; |
1062 size_t size; | 1040 size_t size; |
1063 uintptr_t *code; | 1041 uintptr_t *code; |
1064 ngx_str_t *hide; | |
1065 ngx_uint_t i; | 1042 ngx_uint_t i; |
1066 ngx_array_t headers_names; | 1043 ngx_array_t headers_names; |
1067 ngx_keyval_t *src; | 1044 ngx_keyval_t *src; |
1068 ngx_hash_key_t *hk; | 1045 ngx_hash_key_t *hk; |
1069 ngx_hash_init_t hash; | 1046 ngx_hash_init_t hash; |
1278 | 1255 |
1279 hash.max_size = 512; | 1256 hash.max_size = 512; |
1280 hash.bucket_size = ngx_align(64, ngx_cacheline_size); | 1257 hash.bucket_size = ngx_align(64, ngx_cacheline_size); |
1281 hash.name = "scgi_hide_headers_hash"; | 1258 hash.name = "scgi_hide_headers_hash"; |
1282 | 1259 |
1283 #if (NGX_HTTP_CACHE) | |
1284 | |
1285 hide = conf->upstream.cache ? ngx_http_scgi_hide_cache_headers: | |
1286 ngx_http_scgi_hide_headers; | |
1287 #else | |
1288 | |
1289 hide = ngx_http_scgi_hide_headers; | |
1290 | |
1291 #endif | |
1292 | |
1293 if (ngx_http_upstream_hide_headers_hash(cf, &conf->upstream, | 1260 if (ngx_http_upstream_hide_headers_hash(cf, &conf->upstream, |
1294 &prev->upstream, hide, &hash) | 1261 &prev->upstream, ngx_http_scgi_hide_headers, &hash) |
1295 != NGX_OK) | 1262 != NGX_OK) |
1296 { | 1263 { |
1297 return NGX_CONF_ERROR; | 1264 return NGX_CONF_ERROR; |
1298 } | 1265 } |
1299 | 1266 |