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_controller.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 'src/nxt_controller.c')
-rw-r--r-- | src/nxt_controller.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/nxt_controller.c b/src/nxt_controller.c index 6898be6d..a3c0af17 100644 --- a/src/nxt_controller.c +++ b/src/nxt_controller.c @@ -554,14 +554,7 @@ nxt_controller_process_request(nxt_task_t *task, nxt_conn_t *c, static const nxt_str_t empty_obj = nxt_string("{}"); - path.start = req->parser.target_start; - - if (req->parser.args_start != NULL) { - path.length = req->parser.args_start - path.start; - - } else { - path.length = req->parser.target_end - path.start; - } + path = req->parser.path; if (path.length > 1 && path.start[path.length - 1] == '/') { path.length--; |