Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 2592:3a8a53c0c42f
a prelimiary proxy cache support
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 23 Mar 2009 13:14:51 +0000 |
parents | 7162ac8d564f |
children | cb96a60c8f10 |
comparison
equal
deleted
inserted
replaced
2591:7162ac8d564f | 2592:3a8a53c0c42f |
---|---|
117 { ngx_string("before"), NGX_HTTP_IMS_BEFORE }, | 117 { ngx_string("before"), NGX_HTTP_IMS_BEFORE }, |
118 { ngx_null_string, 0 } | 118 { ngx_null_string, 0 } |
119 }; | 119 }; |
120 | 120 |
121 | 121 |
122 static ngx_path_init_t ngx_http_client_temp_path = { | |
123 ngx_string(NGX_HTTP_CLIENT_TEMP_PATH), { 0, 0, 0 } | |
124 }; | |
125 | |
126 | |
122 #if (NGX_HTTP_GZIP) | 127 #if (NGX_HTTP_GZIP) |
123 | 128 |
124 static ngx_conf_enum_t ngx_http_gzip_http_version[] = { | 129 static ngx_conf_enum_t ngx_http_gzip_http_version[] = { |
125 { ngx_string("1.0"), NGX_HTTP_VERSION_10 }, | 130 { ngx_string("1.0"), NGX_HTTP_VERSION_10 }, |
126 { ngx_string("1.1"), NGX_HTTP_VERSION_11 }, | 131 { ngx_string("1.1"), NGX_HTTP_VERSION_11 }, |
345 { ngx_string("client_body_temp_path"), | 350 { ngx_string("client_body_temp_path"), |
346 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, | 351 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1234, |
347 ngx_conf_set_path_slot, | 352 ngx_conf_set_path_slot, |
348 NGX_HTTP_LOC_CONF_OFFSET, | 353 NGX_HTTP_LOC_CONF_OFFSET, |
349 offsetof(ngx_http_core_loc_conf_t, client_body_temp_path), | 354 offsetof(ngx_http_core_loc_conf_t, client_body_temp_path), |
350 (void *) ngx_garbage_collector_temp_handler }, | 355 NULL }, |
351 | 356 |
352 { ngx_string("client_body_in_file_only"), | 357 { ngx_string("client_body_in_file_only"), |
353 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | 358 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, |
354 ngx_conf_set_enum_slot, | 359 ngx_conf_set_enum_slot, |
355 NGX_HTTP_LOC_CONF_OFFSET, | 360 NGX_HTTP_LOC_CONF_OFFSET, |
2182 | 2187 |
2183 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); | 2188 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); |
2184 r->loc_conf = cscf->ctx->loc_conf; | 2189 r->loc_conf = cscf->ctx->loc_conf; |
2185 | 2190 |
2186 ngx_http_update_location_config(r); | 2191 ngx_http_update_location_config(r); |
2192 | |
2193 #if (NGX_HTTP_CACHE) | |
2194 r->cache = NULL; | |
2195 #endif | |
2187 | 2196 |
2188 r->internal = 1; | 2197 r->internal = 1; |
2189 | 2198 |
2190 ngx_http_handler(r); | 2199 ngx_http_handler(r); |
2191 | 2200 |
3154 } | 3163 } |
3155 | 3164 |
3156 conf->resolver = prev->resolver; | 3165 conf->resolver = prev->resolver; |
3157 } | 3166 } |
3158 | 3167 |
3159 ngx_conf_merge_path_value(conf->client_body_temp_path, | 3168 if (ngx_conf_merge_path_value(cf, &conf->client_body_temp_path, |
3160 prev->client_body_temp_path, | 3169 prev->client_body_temp_path, |
3161 NGX_HTTP_CLIENT_TEMP_PATH, 0, 0, 0, | 3170 &ngx_http_client_temp_path) |
3162 ngx_garbage_collector_temp_handler, cf); | 3171 != NGX_OK) |
3172 { | |
3173 return NGX_CONF_ERROR; | |
3174 } | |
3163 | 3175 |
3164 ngx_conf_merge_value(conf->reset_timedout_connection, | 3176 ngx_conf_merge_value(conf->reset_timedout_connection, |
3165 prev->reset_timedout_connection, 0); | 3177 prev->reset_timedout_connection, 0); |
3166 ngx_conf_merge_value(conf->server_name_in_redirect, | 3178 ngx_conf_merge_value(conf->server_name_in_redirect, |
3167 prev->server_name_in_redirect, 1); | 3179 prev->server_name_in_redirect, 1); |