summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_parse.c
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
commitb1b9c78362629d42f44d718b9a1d5ef3e1eaf308 (patch)
tree0a3ede2922b21632d4f3e19fcafb03ffee24e8c7 /src/nxt_http_parse.c
parenteb51264710f77704e51f5315580ebda474eeb0c8 (diff)
downloadunit-b1b9c78362629d42f44d718b9a1d5ef3e1eaf308.tar.gz
unit-b1b9c78362629d42f44d718b9a1d5ef3e1eaf308.tar.bz2
HTTP parser: correct "target" for partial or invalid request line.
Diffstat (limited to 'src/nxt_http_parse.c')
-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 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: