Lines Matching refs:cf
28 ngx_conf_t *cf; member
44 static void *ngx_http_map_create_conf(ngx_conf_t *cf);
45 static char *ngx_http_map_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
46 static char *ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf);
159 ngx_http_map_create_conf(ngx_conf_t *cf) in ngx_http_map_create_conf() argument
163 mcf = ngx_palloc(cf->pool, sizeof(ngx_http_map_conf_t)); in ngx_http_map_create_conf()
176 ngx_http_map_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) in ngx_http_map_block() argument
202 map = ngx_pcalloc(cf->pool, sizeof(ngx_http_map_ctx_t)); in ngx_http_map_block()
207 value = cf->args->elts; in ngx_http_map_block()
211 ccv.cf = cf; in ngx_http_map_block()
222 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, in ngx_http_map_block()
230 var = ngx_http_add_variable(cf, &name, NGX_HTTP_VAR_CHANGEABLE); in ngx_http_map_block()
238 pool = ngx_create_pool(NGX_DEFAULT_POOL_SIZE, cf->log); in ngx_http_map_block()
243 ctx.keys.pool = cf->pool; in ngx_http_map_block()
258 if (ngx_array_init(&ctx.regexes, cf->pool, 2, sizeof(ngx_http_map_regex_t)) in ngx_http_map_block()
267 ctx.cf = &save; in ngx_http_map_block()
271 save = *cf; in ngx_http_map_block()
272 cf->pool = pool; in ngx_http_map_block()
273 cf->ctx = &ctx; in ngx_http_map_block()
274 cf->handler = ngx_http_map; in ngx_http_map_block()
275 cf->handler_conf = conf; in ngx_http_map_block()
277 rv = ngx_conf_parse(cf, NULL); in ngx_http_map_block()
279 *cf = save; in ngx_http_map_block()
299 hash.pool = cf->pool; in ngx_http_map_block()
381 ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) in ngx_http_map() argument
393 ctx = cf->ctx; in ngx_http_map()
395 value = cf->args->elts; in ngx_http_map()
397 if (cf->args->nelts == 1 in ngx_http_map()
404 if (cf->args->nelts == 1 in ngx_http_map()
411 if (cf->args->nelts != 2) { in ngx_http_map()
412 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, in ngx_http_map()
418 return ngx_conf_include(cf, dummy, conf); in ngx_http_map()
455 if (ngx_array_init(&ctx->values_hash[key], cf->pool, 4, in ngx_http_map()
476 ccv.cf = ctx->cf; in ngx_http_map()
517 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, in ngx_http_map()
554 regex->regex = ngx_http_regex_compile(ctx->cf, &rc); in ngx_http_map()
579 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, in ngx_http_map()
584 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, in ngx_http_map()