diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-07-05 13:31:45 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-07-05 13:31:45 +0300 |
commit | f3107f3896c199a5bc166f57ccd9fef2823ccdaf (patch) | |
tree | 1bb2388940d3ad1be08ababfecd270c65289cf26 /src/nxt_application.c | |
parent | f05d674126f3ec3f147f645231a1357e4a0784bf (diff) | |
download | unit-f3107f3896c199a5bc166f57ccd9fef2823ccdaf.tar.gz unit-f3107f3896c199a5bc166f57ccd9fef2823ccdaf.tar.bz2 |
Complex target parser copied from NGINX.
nxt_app_request_header_t fields renamed:
- 'path' renamed to 'target'.
- 'path_no_query' renamed to 'path' and contains parsed value.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_application.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/nxt_application.c b/src/nxt_application.c index d7393de7..37e2577c 100644 --- a/src/nxt_application.c +++ b/src/nxt_application.c @@ -477,19 +477,11 @@ nxt_app_http_req_parse(nxt_task_t *task, nxt_app_parse_ctx_t *ctx, h->method = p->method; - h->path.start = p->target_start; - h->path.length = p->target_end - p->target_start; + h->target.start = p->target_start; + h->target.length = p->target_end - p->target_start; - h->path_no_query = h->path; - - if (p->args_start != NULL) { - h->query.start = p->args_start; - h->query.length = p->target_end - p->args_start; - - if (p->args_start > p->target_start) { - h->path_no_query.length = p->args_start - p->target_start - 1; - } - } + h->path = p->path; + h->query = p->args; if (h->parsed_content_length == 0) { b->done = 1; |