Lines Matching refs:conf

82     nxt_http_static_conf_t  *conf;  in nxt_http_static_init()  local
86 conf = nxt_mp_zget(mp, sizeof(nxt_http_static_conf_t)); in nxt_http_static_init()
87 if (nxt_slow_path(conf == NULL)) { in nxt_http_static_init()
92 action->u.conf = conf; in nxt_http_static_init()
94 conf->nshares = nxt_conf_array_elements_count_or_1(acf->share); in nxt_http_static_init()
95 conf->shares = nxt_mp_zget(mp, sizeof(nxt_http_static_share_t) in nxt_http_static_init()
96 * conf->nshares); in nxt_http_static_init()
97 if (nxt_slow_path(conf->shares == NULL)) { in nxt_http_static_init()
101 for (i = 0; i < conf->nshares; i++) { in nxt_http_static_init()
110 conf->shares[i].var = var; in nxt_http_static_init()
111 conf->shares[i].is_const = nxt_var_is_const(var); in nxt_http_static_init()
115 nxt_str_set(&conf->index, "index.html"); in nxt_http_static_init()
120 ret = nxt_str_dup(mp, &conf->index, &str); in nxt_http_static_init()
131 conf->chroot = nxt_var_compile(&acf->chroot, mp, 1); in nxt_http_static_init()
132 if (nxt_slow_path(conf->chroot == NULL)) { in nxt_http_static_init()
136 is_const = nxt_var_is_const(conf->chroot); in nxt_http_static_init()
138 for (i = 0; i < conf->nshares; i++) { in nxt_http_static_init()
139 conf->shares[i].is_const &= is_const; in nxt_http_static_init()
141 if (conf->shares[i].is_const) { in nxt_http_static_init()
142 nxt_var_raw(conf->chroot, &chr); in nxt_http_static_init()
143 nxt_var_raw(conf->shares[i].var, &shr); in nxt_http_static_init()
145 conf->shares[i].fname = nxt_http_static_chroot_match(chr.start, in nxt_http_static_init()
154 conf->resolve |= RESOLVE_NO_SYMLINKS; in nxt_http_static_init()
160 conf->resolve |= RESOLVE_NO_XDEV; in nxt_http_static_init()
165 conf->types = nxt_http_route_types_rule_create(task, mp, acf->types); in nxt_http_static_init()
166 if (nxt_slow_path(conf->types == NULL)) { in nxt_http_static_init()
229 nxt_http_static_conf_t *conf; in nxt_http_static_iterate() local
232 conf = ctx->action->u.conf; in nxt_http_static_iterate()
234 share = &conf->shares[ctx->share_idx]; in nxt_http_static_iterate()
241 idx = conf->index; in nxt_http_static_iterate()
246 if (conf->chroot != NULL) { in nxt_http_static_iterate()
247 nxt_var_raw(conf->chroot, &chr); in nxt_http_static_iterate()
264 if (conf->chroot != NULL && ctx->share_idx == 0) { in nxt_http_static_iterate()
265 nxt_var_raw(conf->chroot, &ctx->chroot); in nxt_http_static_iterate()
281 if (conf->chroot != NULL && ctx->share_idx == 0) { in nxt_http_static_iterate()
282 nxt_var_query(task, r->var_query, conf->chroot, &ctx->chroot); in nxt_http_static_iterate()
312 nxt_http_static_conf_t *conf; in nxt_http_static_send_ready() local
317 conf = action->u.conf; in nxt_http_static_send_ready()
318 rtcf = r->conf->socket_conf->router_conf; in nxt_http_static_send_ready()
324 index = &conf->index; in nxt_http_static_send_ready()
342 if (conf->types == NULL) { in nxt_http_static_send_ready()
349 ret = nxt_http_route_test_rule(r, conf->types, mtype->start, in nxt_http_static_send_ready()
369 if (conf->resolve != 0 || ctx->chroot.length > 0) { in nxt_http_static_send_ready()
374 share = &conf->shares[ctx->share_idx]; in nxt_http_static_send_ready()
376 resolve = conf->resolve; in nxt_http_static_send_ready()
673 nxt_http_static_conf_t *conf; in nxt_http_static_next() local
676 conf = action->u.conf; in nxt_http_static_next()
680 if (ctx->share_idx < conf->nshares) { in nxt_http_static_next()