# HG changeset patch # User Igor Sysoev # Date 1278062738 0 # Node ID 12bd9e26fadb604c29f50f766421287b5ae3435b # Parent cd6d45c0a1195c23af9f493bb7883b349c9b9b20 use shared ngx_http_upstream_ignore_headers_masks[] diff -r cd6d45c0a119 -r 12bd9e26fadb src/http/modules/ngx_http_fastcgi_module.c --- a/src/http/modules/ngx_http_fastcgi_module.c Thu Jul 01 12:56:32 2010 +0000 +++ b/src/http/modules/ngx_http_fastcgi_module.c Fri Jul 02 09:25:38 2010 +0000 @@ -183,15 +183,6 @@ }; -static ngx_conf_bitmask_t ngx_http_fastcgi_ignore_headers_masks[] = { - { ngx_string("X-Accel-Redirect"), NGX_HTTP_UPSTREAM_IGN_XA_REDIRECT }, - { ngx_string("X-Accel-Expires"), NGX_HTTP_UPSTREAM_IGN_XA_EXPIRES }, - { ngx_string("Expires"), NGX_HTTP_UPSTREAM_IGN_EXPIRES }, - { ngx_string("Cache-Control"), NGX_HTTP_UPSTREAM_IGN_CACHE_CONTROL }, - { ngx_null_string, 0 } -}; - - ngx_module_t ngx_http_fastcgi_module; @@ -430,7 +421,7 @@ ngx_conf_set_bitmask_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_fastcgi_loc_conf_t, upstream.ignore_headers), - &ngx_http_fastcgi_ignore_headers_masks }, + &ngx_http_upstream_ignore_headers_masks }, { ngx_string("fastcgi_catch_stderr"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, diff -r cd6d45c0a119 -r 12bd9e26fadb src/http/modules/ngx_http_proxy_module.c --- a/src/http/modules/ngx_http_proxy_module.c Thu Jul 01 12:56:32 2010 +0000 +++ b/src/http/modules/ngx_http_proxy_module.c Fri Jul 02 09:25:38 2010 +0000 @@ -157,15 +157,6 @@ }; -static ngx_conf_bitmask_t ngx_http_proxy_ignore_headers_masks[] = { - { ngx_string("X-Accel-Redirect"), NGX_HTTP_UPSTREAM_IGN_XA_REDIRECT }, - { ngx_string("X-Accel-Expires"), NGX_HTTP_UPSTREAM_IGN_XA_EXPIRES }, - { ngx_string("Expires"), NGX_HTTP_UPSTREAM_IGN_EXPIRES }, - { ngx_string("Cache-Control"), NGX_HTTP_UPSTREAM_IGN_CACHE_CONTROL }, - { ngx_null_string, 0 } -}; - - ngx_module_t ngx_http_proxy_module; @@ -432,7 +423,7 @@ ngx_conf_set_bitmask_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_proxy_loc_conf_t, upstream.ignore_headers), - &ngx_http_proxy_ignore_headers_masks }, + &ngx_http_upstream_ignore_headers_masks }, #if (NGX_HTTP_SSL) diff -r cd6d45c0a119 -r 12bd9e26fadb src/http/modules/ngx_http_scgi_module.c --- a/src/http/modules/ngx_http_scgi_module.c Thu Jul 01 12:56:32 2010 +0000 +++ b/src/http/modules/ngx_http_scgi_module.c Fri Jul 02 09:25:38 2010 +0000 @@ -296,7 +296,7 @@ ngx_conf_set_bitmask_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_scgi_loc_conf_t, upstream.ignore_headers), - &ngx_http_scgi_ignore_headers_masks }, + &ngx_http_upstream_ignore_headers_masks }, ngx_null_command }; diff -r cd6d45c0a119 -r 12bd9e26fadb src/http/modules/ngx_http_uwsgi_module.c --- a/src/http/modules/ngx_http_uwsgi_module.c Thu Jul 01 12:56:32 2010 +0000 +++ b/src/http/modules/ngx_http_uwsgi_module.c Fri Jul 02 09:25:38 2010 +0000 @@ -83,15 +83,6 @@ }; -static ngx_conf_bitmask_t ngx_http_uwsgi_ignore_headers_masks[] = { - { ngx_string("X-Accel-Redirect"), NGX_HTTP_UPSTREAM_IGN_XA_REDIRECT }, - { ngx_string("X-Accel-Expires"), NGX_HTTP_UPSTREAM_IGN_XA_EXPIRES }, - { ngx_string("Expires"), NGX_HTTP_UPSTREAM_IGN_EXPIRES }, - { ngx_string("Cache-Control"), NGX_HTTP_UPSTREAM_IGN_CACHE_CONTROL }, - { ngx_null_string, 0 } -}; - - ngx_module_t ngx_http_uwsgi_module; @@ -330,7 +321,7 @@ ngx_conf_set_bitmask_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_uwsgi_loc_conf_t, upstream.ignore_headers), - &ngx_http_uwsgi_ignore_headers_masks }, + &ngx_http_upstream_ignore_headers_masks }, ngx_null_command }; diff -r cd6d45c0a119 -r 12bd9e26fadb src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c Thu Jul 01 12:56:32 2010 +0000 +++ b/src/http/ngx_http_upstream.c Fri Jul 02 09:25:38 2010 +0000 @@ -355,6 +355,15 @@ }; +ngx_conf_bitmask_t ngx_http_upstream_ignore_headers_masks[] = { + { ngx_string("X-Accel-Redirect"), NGX_HTTP_UPSTREAM_IGN_XA_REDIRECT }, + { ngx_string("X-Accel-Expires"), NGX_HTTP_UPSTREAM_IGN_XA_EXPIRES }, + { ngx_string("Expires"), NGX_HTTP_UPSTREAM_IGN_EXPIRES }, + { ngx_string("Cache-Control"), NGX_HTTP_UPSTREAM_IGN_CACHE_CONTROL }, + { ngx_null_string, 0 } +}; + + ngx_int_t ngx_http_upstream_create(ngx_http_request_t *r) { diff -r cd6d45c0a119 -r 12bd9e26fadb src/http/ngx_http_upstream.h --- a/src/http/ngx_http_upstream.h Thu Jul 01 12:56:32 2010 +0000 +++ b/src/http/ngx_http_upstream.h Fri Jul 02 09:25:38 2010 +0000 @@ -337,6 +337,7 @@ extern ngx_module_t ngx_http_upstream_module; extern ngx_conf_bitmask_t ngx_http_upstream_cache_method_mask[]; +extern ngx_conf_bitmask_t ngx_http_upstream_ignore_headers_masks[]; #endif /* _NGX_HTTP_UPSTREAM_H_INCLUDED_ */