diff options
| author | Konstantin Pavlov <thresh@nginx.com> | 2022-09-13 13:17:16 +0400 |
|---|---|---|
| committer | Konstantin Pavlov <thresh@nginx.com> | 2022-09-13 13:17:16 +0400 |
| commit | ce964aa30b163e2b3263c5af57c1a6dae7d0cebb (patch) | |
| tree | 26bf70c1a5991f6471fc4caed8628e068fdc0b7b /src/nxt_http_return.c | |
| parent | eba4c3c98fa1bf275d94df8c727f70692ae7eae1 (diff) | |
| parent | 38bd7e76a134084ab95a4ee3125af1ccd7b35864 (diff) | |
| download | unit-1.28.0-1.tar.gz unit-1.28.0-1.tar.bz2 | |
Merged with the default branch.1.28.0-1
Diffstat (limited to 'src/nxt_http_return.c')
| -rw-r--r-- | src/nxt_http_return.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nxt_http_return.c b/src/nxt_http_return.c index 82c91568..9f3c4fc5 100644 --- a/src/nxt_http_return.c +++ b/src/nxt_http_return.c @@ -32,12 +32,15 @@ static const nxt_http_request_state_t nxt_http_return_send_state; nxt_int_t -nxt_http_return_init(nxt_mp_t *mp, nxt_http_action_t *action, +nxt_http_return_init(nxt_router_conf_t *rtcf, nxt_http_action_t *action, nxt_http_action_conf_t *acf) { + nxt_mp_t *mp; nxt_str_t str; nxt_http_return_conf_t *conf; + mp = rtcf->mem_pool; + conf = nxt_mp_zget(mp, sizeof(nxt_http_return_conf_t)); if (nxt_slow_path(conf == NULL)) { return NXT_ERROR; @@ -54,7 +57,7 @@ nxt_http_return_init(nxt_mp_t *mp, nxt_http_action_t *action, nxt_conf_get_string(acf->location, &str); - conf->location = nxt_var_compile(&str, mp, 0); + conf->location = nxt_var_compile(&str, mp, rtcf->var_fields, 0); if (nxt_slow_path(conf->location == NULL)) { return NXT_ERROR; } |
