summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_controller.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-07-05 13:31:45 +0300
committerMax Romanov <max.romanov@nginx.com>2017-07-05 13:31:45 +0300
commitf3107f3896c199a5bc166f57ccd9fef2823ccdaf (patch)
tree1bb2388940d3ad1be08ababfecd270c65289cf26 /src/nxt_controller.c
parentf05d674126f3ec3f147f645231a1357e4a0784bf (diff)
downloadunit-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.c9
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--;