comparison src/http/modules/proxy/ngx_http_proxy_handler.c @ 190:02a715e85df1

nginx-0.0.1-2003-11-19-00:34:08 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 18 Nov 2003 21:34:08 +0000
parents c966c09be66b
children 71ce40b3c37b
comparison
equal deleted inserted replaced
189:c966c09be66b 190:02a715e85df1
112 { ngx_string("proxy_cache_path"), 112 { ngx_string("proxy_cache_path"),
113 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, 113 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234,
114 ngx_conf_set_path_slot, 114 ngx_conf_set_path_slot,
115 NGX_HTTP_LOC_CONF_OFFSET, 115 NGX_HTTP_LOC_CONF_OFFSET,
116 offsetof(ngx_http_proxy_loc_conf_t, cache_path), 116 offsetof(ngx_http_proxy_loc_conf_t, cache_path),
117 NULL }, 117 ngx_garbage_collector_http_cache_handler },
118 118
119 { ngx_string("proxy_temp_path"), 119 { ngx_string("proxy_temp_path"),
120 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, 120 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234,
121 ngx_conf_set_path_slot, 121 ngx_conf_set_path_slot,
122 NGX_HTTP_LOC_CONF_OFFSET, 122 NGX_HTTP_LOC_CONF_OFFSET,
123 offsetof(ngx_http_proxy_loc_conf_t, temp_path), 123 offsetof(ngx_http_proxy_loc_conf_t, temp_path),
124 NULL }, 124 ngx_garbage_collector_temp_handler },
125 125
126 { ngx_string("proxy_temp_file_write_size"), 126 { ngx_string("proxy_temp_file_write_size"),
127 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, 127 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
128 ngx_conf_set_size_slot, 128 ngx_conf_set_size_slot,
129 NGX_HTTP_LOC_CONF_OFFSET, 129 NGX_HTTP_LOC_CONF_OFFSET,
253 offsetof(ngx_http_proxy_headers_in_t, content_type) }, 253 offsetof(ngx_http_proxy_headers_in_t, content_type) },
254 { ngx_string("Content-Length"), 254 { ngx_string("Content-Length"),
255 offsetof(ngx_http_proxy_headers_in_t, content_length) }, 255 offsetof(ngx_http_proxy_headers_in_t, content_length) },
256 { ngx_string("Last-Modified"), 256 { ngx_string("Last-Modified"),
257 offsetof(ngx_http_proxy_headers_in_t, last_modified) }, 257 offsetof(ngx_http_proxy_headers_in_t, last_modified) },
258 { ngx_string("Location"),
259 offsetof(ngx_http_proxy_headers_in_t, location) },
258 { ngx_string("Accept-Ranges"), 260 { ngx_string("Accept-Ranges"),
259 offsetof(ngx_http_proxy_headers_in_t, accept_ranges) }, 261 offsetof(ngx_http_proxy_headers_in_t, accept_ranges) },
260 262
261 { ngx_null_string, 0 } 263 { ngx_null_string, 0 }
262 }; 264 };
930 932
931 ctx = cf->ctx; 933 ctx = cf->ctx;
932 clcf = ctx->loc_conf[ngx_http_core_module.ctx_index]; 934 clcf = ctx->loc_conf[ngx_http_core_module.ctx_index];
933 lcf->upstream->location = &clcf->name; 935 lcf->upstream->location = &clcf->name;
934 clcf->handler = ngx_http_proxy_handler; 936 clcf->handler = ngx_http_proxy_handler;
937 clcf->auto_redirect = 1;
935 938
936 return NULL; 939 return NULL;
937 } 940 }
938 941
939 942