summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2017-06-09 21:49:51 +0300
committerValentin Bartenev <vbart@nginx.com>2017-06-09 21:49:51 +0300
commitf6e7c2b6a6b36fb54cc771e27dff61b8f079e688 (patch)
treed4181328e2ab17b10d2cf8010029b79b1d9d4610 /src
parentc5cd7e5e975b37f6ca1e969da269739218e791c5 (diff)
downloadunit-f6e7c2b6a6b36fb54cc771e27dff61b8f079e688.tar.gz
unit-f6e7c2b6a6b36fb54cc771e27dff61b8f079e688.tar.bz2
HTTP parser: fixed handling header fields with missing colon.
Diffstat (limited to '')
-rw-r--r--src/nxt_http_parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nxt_http_parse.c b/src/nxt_http_parse.c
index 3fc8b494..9424dc8b 100644
--- a/src/nxt_http_parse.c
+++ b/src/nxt_http_parse.c
@@ -482,7 +482,9 @@ name_end:
return nxt_http_parse_field_value(rp, pos, end);
}
- *pos = &p[i];
+ if (nxt_slow_path(i != 0)) {
+ return NXT_ERROR;
+ }
rp->field_name.length = 0;