diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2023-05-10 10:29:16 -0700 |
---|---|---|
committer | Konstantin Pavlov <thresh@nginx.com> | 2023-05-10 10:29:16 -0700 |
commit | 69235c513277c64b513447d9b92c3c03d616f577 (patch) | |
tree | 0780c92ba28d92b547c85ea0bee5e3040e14dee2 /src/nxt_http_variables.c | |
parent | b9bc222021e77bbdfb12576b3e315b962cf6b399 (diff) | |
parent | faf97dc06058de1c929af33a68adb34d3932b374 (diff) | |
download | unit-1.30.0-1.tar.gz unit-1.30.0-1.tar.bz2 |
Merged with the default branch.1.30.0-1
Diffstat (limited to '')
-rw-r--r-- | src/nxt_http_variables.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/src/nxt_http_variables.c b/src/nxt_http_variables.c index fa0244db..b73d9151 100644 --- a/src/nxt_http_variables.c +++ b/src/nxt_http_variables.c @@ -273,40 +273,11 @@ static nxt_int_t nxt_http_var_request_line(nxt_task_t *task, nxt_str_t *str, void *ctx, uint16_t field) { - size_t length; - u_char *p, *start; nxt_http_request_t *r; r = ctx; - length = r->method->length + 1 + r->target.length + 1 + r->version.length; - - start = nxt_mp_nget(r->mem_pool, length); - if (nxt_slow_path(start == NULL)) { - return NXT_ERROR; - } - - p = start; - - if (r->method->length != 0) { - p = nxt_cpymem(p, r->method->start, r->method->length); - - if (r->target.length != 0) { - *p++ = ' '; - p = nxt_cpymem(p, r->target.start, r->target.length); - - if (r->version.length != 0) { - *p++ = ' '; - p = nxt_cpymem(p, r->version.start, r->version.length); - } - } - - } else { - *p++ = '-'; - } - - str->start = start; - str->length = p - start; + *str = r->request_line; return NXT_OK; } |