From a336928e1027af92d0c9bb2ccb369a3f9b53abae Mon Sep 17 00:00:00 2001 From: Zhidao HONG Date: Tue, 7 Sep 2021 21:13:44 +0800 Subject: Router: refactored variable pass. Since the "pass" option supports both strings and variables, a generic nxt_var_t structure can be used in the configuration phase, and the "name" field in actions is redundant. No functional changes. --- src/nxt_http.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nxt_http.h') diff --git a/src/nxt_http.h b/src/nxt_http.h index 3bc2fd61..332ac932 100644 --- a/src/nxt_http.h +++ b/src/nxt_http.h @@ -226,9 +226,9 @@ struct nxt_http_action_s { nxt_upstream_t *upstream; uint32_t upstream_number; nxt_var_t *var; + nxt_str_t *pass; } u; - nxt_str_t name; nxt_http_action_t *fallback; }; @@ -313,7 +313,7 @@ nxt_int_t nxt_http_request_content_length(void *ctx, nxt_http_field_t *field, 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); + nxt_router_temp_conf_t *tmcf, nxt_str_t *pass); 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, -- cgit From aee908bcbd6ae160ab8e470ea6a373148649968b Mon Sep 17 00:00:00 2001 From: Zhidao HONG Date: Fri, 5 Nov 2021 22:56:34 +0800 Subject: Router: matching query string support. The "query" option matches decoded arguments, including plus ('+') to space (' '). Like "uri", it can be a string or an array of strings. --- src/nxt_http.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nxt_http.h') diff --git a/src/nxt_http.h b/src/nxt_http.h index 332ac932..02d66f58 100644 --- a/src/nxt_http.h +++ b/src/nxt_http.h @@ -148,6 +148,7 @@ struct nxt_http_request_s { nxt_str_t *path; nxt_str_t *args; + nxt_str_t args_decoded; nxt_array_t *arguments; /* of nxt_http_name_value_t */ nxt_array_t *cookies; /* of nxt_http_name_value_t */ nxt_list_t *fields; -- cgit