HTTP parser: simplified nxt_http_parse_field_value().

There's no need in loop after 4ac474b68658.

Found by Coverity (CID 259713).
This commit is contained in:
Valentin Bartenev
2018-01-25 10:31:22 +03:00
parent 4b19848e4e
commit 7fe8f72364

View File

@@ -629,7 +629,6 @@ nxt_http_parse_field_value(nxt_http_request_parse_t *rp, u_char **pos,
p += rp->field_value.length;
for ( ;; ) {
p = nxt_http_lookup_field_end(p, end);
if (nxt_slow_path(p == end)) {
@@ -646,10 +645,7 @@ nxt_http_parse_field_value(nxt_http_request_parse_t *rp, u_char **pos,
ch = *p;
if (nxt_fast_path(ch == '\r' || ch == '\n')) {
break;
}
if (nxt_slow_path(ch != '\r' && ch != '\n')) {
return NXT_HTTP_PARSE_INVALID;
}