From 41317e37dae9afa3400084243175559a33f6686f Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Tue, 10 Apr 2018 16:51:22 +0300 Subject: HTTP parser: saving partial method. This is useful for log purposes. --- src/nxt_http_parse.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nxt_http_parse.c') 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; } -- cgit