summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_tstr.h
diff options
context:
space:
mode:
authorZhidao HONG <z.hong@f5.com>2023-04-20 23:20:41 +0800
committerZhidao HONG <z.hong@f5.com>2023-04-20 23:20:41 +0800
commit14d6d97bacf9b06ba340ebd4211b2f1b6ad417dd (patch)
tree68dd559c475cc0dffdf1254c75971fcae9a89ed5 /src/nxt_tstr.h
parent8843e30e8275aa70bf7eec11709cd5d12e32b4ae (diff)
downloadunit-14d6d97bacf9b06ba340ebd4211b2f1b6ad417dd.tar.gz
unit-14d6d97bacf9b06ba340ebd4211b2f1b6ad417dd.tar.bz2
HTTP: added basic URI rewrite.
This commit introduced the basic URI rewrite. It allows users to change request URI. Note the "rewrite" option ignores the contained query if any and the query from the request is preserverd. An example: "routes": [ { "match": { "uri": "/v1/test" }, "action": { "return": 200 } }, { "action": { "rewrite": "/v1$uri", "pass": "routes" } } ] Reviewed-by: Alejandro Colomar <alx@nginx.com>
Diffstat (limited to 'src/nxt_tstr.h')
-rw-r--r--src/nxt_tstr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nxt_tstr.h b/src/nxt_tstr.h
index ce8e6f3a..afa7f56d 100644
--- a/src/nxt_tstr.h
+++ b/src/nxt_tstr.h
@@ -52,6 +52,7 @@ nxt_int_t nxt_tstr_query_init(nxt_tstr_query_t **query_p,
nxt_mp_t *mp);
void nxt_tstr_query(nxt_task_t *task, nxt_tstr_query_t *query, nxt_tstr_t *tstr,
nxt_str_t *val);
+nxt_bool_t nxt_tstr_query_failed(nxt_tstr_query_t *query);
void nxt_tstr_query_resolve(nxt_task_t *task, nxt_tstr_query_t *query,
void *data, nxt_work_handler_t ready, nxt_work_handler_t error);
void nxt_tstr_query_handle(nxt_task_t *task, nxt_tstr_query_t *query,