Configuration: URI encoding in the "pass" option.

This is useful to escape "/" in path fragments.  For example, in order
to reference the application named "foo/bar":

  {
      "pass": "applications/foo%2Fbar"
  }
This commit is contained in:
Valentin Bartenev
2020-05-14 13:15:00 +03:00
parent d803ec39bc
commit 0174c971b5
5 changed files with 123 additions and 66 deletions

View File

@@ -1793,6 +1793,11 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
}
}
ret = nxt_http_routes_resolve(task, tmcf);
if (nxt_slow_path(ret != NXT_OK)) {
goto fail;
}
value = nxt_conf_get_path(conf, &access_log_path);
if (value != NULL) {
@@ -1827,8 +1832,6 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
tmcf->router_conf->access_log = access_log;
}
nxt_http_routes_resolve(task, tmcf);
nxt_queue_add(&tmcf->deleting, &router->sockets);
nxt_queue_init(&router->sockets);