summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-04-10 16:51:22 +0300
committerValentin Bartenev <vbart@nginx.com>2018-04-10 16:51:22 +0300
commit41317e37dae9afa3400084243175559a33f6686f (patch)
tree245f08b80f04fc5b120e2991a4d0763c81a76eef
parent8d697e8004c7c73139f1055e15f9860dd2d1b165 (diff)
downloadunit-41317e37dae9afa3400084243175559a33f6686f.tar.gz
unit-41317e37dae9afa3400084243175559a33f6686f.tar.bz2
HTTP parser: saving partial method.
This is useful for log purposes.
-rw-r--r--src/nxt_http_parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_http_parse.c b/src/nxt_http_parse.c
index c0945faf..7aa5f53f 100644
--- a/src/nxt_http_parse.c
+++ b/src/nxt_http_parse.c
@@ -209,6 +209,8 @@ nxt_http_parse_request_line(nxt_http_request_parse_t *rp, u_char **pos,
nxt_method_test_char(*p); p++;
}
+ rp->method.length = p - rp->method.start;
+
return NXT_AGAIN;
method_unusual_char:
@@ -231,6 +233,8 @@ nxt_http_parse_request_line(nxt_http_request_parse_t *rp, u_char **pos,
continue;
}
+ rp->method.length = p - rp->method.start;
+
return NXT_HTTP_PARSE_INVALID;
}