HTTP parser: simplified nxt_http_parse_field_value().
There's no need in loop after
Found by Coverity (CID 259713).
@@ -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;
}
