Klaus Demo nginx / 90f9552
inherit proxy_pass, fastcgi_pass, uwsgi_pass, scgi_pass inside a limit_except block if no handler was defined for the block Igor Sysoev 9 years ago
6 changed file(s) with 34 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
20242024 ngx_keyval_t *src;
20252025 ngx_hash_key_t *hk;
20262026 ngx_hash_init_t hash;
2027 ngx_http_core_loc_conf_t *clcf;
20272028 ngx_http_script_compile_t sc;
20282029 ngx_http_script_copy_code_t *copy;
20292030
22692270 conf->fastcgi_values = prev->fastcgi_values;
22702271 }
22712272
2273 if (conf->upstream.upstream || conf->fastcgi_lengths) {
2274 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
2275 if (clcf->handler == NULL && clcf->lmt_excpt) {
2276 clcf->handler = ngx_http_fastcgi_handler;
2277 }
2278 }
2279
22722280 #if (NGX_PCRE)
22732281 if (conf->split_regex == NULL) {
22742282 conf->split_regex = prev->split_regex;
17191719 size_t size;
17201720 ngx_keyval_t *s;
17211721 ngx_hash_init_t hash;
1722 ngx_http_core_loc_conf_t *clcf;
17221723 ngx_http_proxy_redirect_t *pr;
17231724 ngx_http_script_compile_t sc;
17241725
20212022 conf->vars = prev->vars;
20222023 }
20232024
2025 if (conf->upstream.upstream || conf->proxy_lengths) {
2026 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
2027 if (clcf->handler == NULL && clcf->lmt_excpt) {
2028 clcf->handler = ngx_http_proxy_handler;
2029 conf->location = prev->location;
2030 }
2031 }
20242032
20252033 if (conf->body_source.data == NULL) {
20262034 conf->body_source = prev->body_source;
10521052 ngx_keyval_t *src;
10531053 ngx_hash_key_t *hk;
10541054 ngx_hash_init_t hash;
1055 ngx_http_core_loc_conf_t *clcf;
10551056 ngx_http_script_compile_t sc;
10561057 ngx_http_script_copy_code_t *copy;
10571058
12841285 conf->scgi_values = prev->scgi_values;
12851286 }
12861287
1288 if (conf->upstream.upstream || conf->scgi_lengths) {
1289 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
1290 if (clcf->handler == NULL && clcf->lmt_excpt) {
1291 clcf->handler = ngx_http_scgi_handler;
1292 }
1293 }
1294
12871295 if (conf->params_source == NULL) {
12881296 conf->flushes = prev->flushes;
12891297 conf->params_len = prev->params_len;
11051105 ngx_keyval_t *src;
11061106 ngx_hash_key_t *hk;
11071107 ngx_hash_init_t hash;
1108 ngx_http_core_loc_conf_t *clcf;
11081109 ngx_http_script_compile_t sc;
11091110 ngx_http_script_copy_code_t *copy;
11101111
13391340 conf->uwsgi_values = prev->uwsgi_values;
13401341 }
13411342
1343 if (conf->upstream.upstream || conf->uwsgi_lengths) {
1344 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
1345 if (clcf->handler == NULL && clcf->lmt_excpt) {
1346 clcf->handler = ngx_http_uwsgi_handler;
1347 }
1348 }
1349
13421350 ngx_conf_merge_uint_value(conf->modifier1, prev->modifier1, 0);
13431351 ngx_conf_merge_uint_value(conf->modifier2, prev->modifier2, 0);
13441352
39073907 clcf->loc_conf = ctx->loc_conf;
39083908 clcf->name = pclcf->name;
39093909 clcf->noname = 1;
3910 clcf->lmt_excpt = 1;
39103911
39113912 if (ngx_http_add_location(cf, &pclcf->locations, clcf) != NGX_OK) {
39123913 return NGX_CONF_ERROR;
285285 #endif
286286
287287 unsigned noname:1; /* "if () {}" block or limit_except */
288 unsigned lmt_excpt:1;
288289 unsigned named:1;
289290
290291 unsigned exact_match:1;