From b1b9c78362629d42f44d718b9a1d5ef3e1eaf308 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Tue, 10 Apr 2018 16:51:22 +0300 Subject: HTTP parser: correct "target" for partial or invalid request line. --- 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 cf0a0c7d..dd86c44f 100644 --- a/src/nxt_http_parse.c +++ b/src/nxt_http_parse.c @@ -303,9 +303,11 @@ nxt_http_parse_request_line(nxt_http_request_parse_t *rp, u_char **pos, goto rest_of_target; case NXT_HTTP_TARGET_AGAIN: + rp->target_end = p; return NXT_AGAIN; case NXT_HTTP_TARGET_BAD: + rp->target_end = p; return NXT_HTTP_PARSE_INVALID; } @@ -329,9 +331,11 @@ rest_of_target: continue; case NXT_HTTP_TARGET_AGAIN: + rp->target_end = p; return NXT_AGAIN; case NXT_HTTP_TARGET_BAD: + rp->target_end = p; return NXT_HTTP_PARSE_INVALID; default: -- cgit