diff options
author | Valentin Bartenev <vbart@nginx.com> | 2020-05-14 13:15:00 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2020-05-14 13:15:00 +0300 |
commit | 0174c971b5ec0d604e4e9becfa41e0bc31179e57 (patch) | |
tree | 8d0c0c41b10cc290084676aac836c1dd2313410b /src/nxt_http.h | |
parent | d803ec39bc75622194802d249edc11fedc8e2441 (diff) | |
download | unit-0174c971b5ec0d604e4e9becfa41e0bc31179e57.tar.gz unit-0174c971b5ec0d604e4e9becfa41e0bc31179e57.tar.bz2 |
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"
}
Diffstat (limited to '')
-rw-r--r-- | src/nxt_http.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nxt_http.h b/src/nxt_http.h index 841f5b40..6f593cd2 100644 --- a/src/nxt_http.h +++ b/src/nxt_http.h @@ -277,7 +277,10 @@ nxt_http_routes_t *nxt_http_routes_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf, nxt_conf_value_t *routes_conf); nxt_http_action_t *nxt_http_action_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf, nxt_str_t *name); -void nxt_http_routes_resolve(nxt_task_t *task, nxt_router_temp_conf_t *tmcf); +nxt_int_t nxt_http_routes_resolve(nxt_task_t *task, + nxt_router_temp_conf_t *tmcf); +nxt_int_t nxt_http_pass_segments(nxt_mp_t *mp, nxt_str_t *pass, + nxt_str_t *segments, nxt_uint_t n); nxt_http_action_t *nxt_http_pass_application(nxt_task_t *task, nxt_router_temp_conf_t *tmcf, nxt_str_t *name); void nxt_http_routes_cleanup(nxt_task_t *task, nxt_http_routes_t *routes); |