diff options
author | Valentin Bartenev <vbart@nginx.com> | 2018-04-10 16:51:22 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2018-04-10 16:51:22 +0300 |
commit | b1b9c78362629d42f44d718b9a1d5ef3e1eaf308 (patch) | |
tree | 0a3ede2922b21632d4f3e19fcafb03ffee24e8c7 | |
parent | eb51264710f77704e51f5315580ebda474eeb0c8 (diff) | |
download | unit-b1b9c78362629d42f44d718b9a1d5ef3e1eaf308.tar.gz unit-b1b9c78362629d42f44d718b9a1d5ef3e1eaf308.tar.bz2 |
HTTP parser: correct "target" for partial or invalid request line.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_http_parse.c | 4 |
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: |