diff options
author | Zhidao HONG <z.hong@f5.com> | 2023-08-09 14:36:16 +0800 |
---|---|---|
committer | Zhidao HONG <z.hong@f5.com> | 2023-08-09 14:36:16 +0800 |
commit | 9f04d6db630a22658581cbe7a9d28ecdb13d8de9 (patch) | |
tree | c5a255f47699c2b14efe4ea808d926c1168c9b16 /src/nxt_http_rewrite.c | |
parent | 497f08d15fc040b3484562cf95dbe242a85fe0df (diff) | |
download | unit-9f04d6db630a22658581cbe7a9d28ecdb13d8de9.tar.gz unit-9f04d6db630a22658581cbe7a9d28ecdb13d8de9.tar.bz2 |
HTTP: stored matched action in nxt_http_request_t.
No functional changes.
Diffstat (limited to 'src/nxt_http_rewrite.c')
-rw-r--r-- | src/nxt_http_rewrite.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nxt_http_rewrite.c b/src/nxt_http_rewrite.c index fac96339..ae5c865a 100644 --- a/src/nxt_http_rewrite.c +++ b/src/nxt_http_rewrite.c @@ -26,15 +26,21 @@ nxt_http_rewrite_init(nxt_router_conf_t *rtcf, nxt_http_action_t *action, nxt_int_t -nxt_http_rewrite(nxt_task_t *task, nxt_http_request_t *r, - nxt_http_action_t *action) +nxt_http_rewrite(nxt_task_t *task, nxt_http_request_t *r) { u_char *p; nxt_int_t ret; nxt_str_t str, encoded_path, target; nxt_router_conf_t *rtcf; + nxt_http_action_t *action; nxt_http_request_parse_t rp; + action = r->action; + + if (action == NULL || action->rewrite == NULL) { + return NXT_OK; + } + if (nxt_tstr_is_const(action->rewrite)) { nxt_tstr_str(action->rewrite, &str); |