summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_parse.c
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_http_parse.c
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_http_parse.c')
-rw-r--r--src/nxt_http_parse.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nxt_http_parse.c b/src/nxt_http_parse.c
index 439993df..50cbda2b 100644
--- a/src/nxt_http_parse.c
+++ b/src/nxt_http_parse.c
@@ -19,8 +19,6 @@ static u_char *nxt_http_lookup_field_end(u_char *p, const u_char *end);
static nxt_int_t nxt_http_parse_field_end(nxt_http_request_parse_t *rp,
u_char **pos, const u_char *end);
-static nxt_int_t nxt_http_parse_complex_target(nxt_http_request_parse_t *rp);
-
static nxt_int_t nxt_http_field_hash_test(nxt_lvlhsh_query_t *lhq, void *data);
static nxt_int_t nxt_http_field_hash_collision(nxt_lvlhsh_query_t *lhq,
@@ -854,7 +852,7 @@ static const uint8_t nxt_http_normal[32] nxt_aligned(32) = {
};
-static nxt_int_t
+nxt_int_t
nxt_http_parse_complex_target(nxt_http_request_parse_t *rp)
{
u_char *p, *u, c, ch, high, *args;