Branch Coverage

deps/libgit2/deps/http-parser/http_parser.c
Criterion Covered Total %
branch 0 928 0.0


line true false branch
427 0 0 if (ch == ' ' || ch == '\r' || ch == '\n') {
0 0 if (ch == ' ' || ch == '\r' || ch == '\n') {
0 0 if (ch == ' ' || ch == '\r' || ch == '\n') {
432 0 0 if (ch == '\t' || ch == '\f') {
0 0 if (ch == '\t' || ch == '\f') {
443 0 0 if (ch == '/' || ch == '*') {
0 0 if (ch == '/' || ch == '*') {
450 0 0 if (IS_ALPHA(ch)) {
0 0 if (IS_ALPHA(ch)) {
457 0 0 if (IS_ALPHANUM(ch) || ch == '+' || ch == '-' || ch == '.') {
0 0 if (IS_ALPHANUM(ch) || ch == '+' || ch == '-' || ch == '.') {
0 0 if (IS_ALPHANUM(ch) || ch == '+' || ch == '-' || ch == '.') {
0 0 if (IS_ALPHANUM(ch) || ch == '+' || ch == '-' || ch == '.') {
0 0 if (IS_ALPHANUM(ch) || ch == '+' || ch == '-' || ch == '.') {
0 0 if (IS_ALPHANUM(ch) || ch == '+' || ch == '-' || ch == '.') {
0 0 if (IS_ALPHANUM(ch) || ch == '+' || ch == '-' || ch == '.') {
461 0 0 if (ch == ':') {
468 0 0 if (ch == '/') {
475 0 0 if (ch == '/') {
482 0 0 if (ch == '@') {
489 0 0 if (ch == '/') {
493 0 0 if (ch == '?') {
497 0 0 if (ch == '@') {
501 0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
0 0 if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
508 0 0 if (IS_URL_CHAR(ch)) {
524 0 0 if (IS_URL_CHAR(ch)) {
540 0 0 if (IS_URL_CHAR(ch)) {
555 0 0 if (IS_URL_CHAR(ch)) {
559 0 0 switch (ch) {
589 0 0 if (HTTP_PARSER_ERRNO(parser) != HPE_OK) {
593 0 0 if (len == 0) {
599 0 0 CALLBACK_NOTIFY_NOADVANCE(message_complete);
0 0 CALLBACK_NOTIFY_NOADVANCE(message_complete);
0 0 CALLBACK_NOTIFY_NOADVANCE(message_complete);
0 0 CALLBACK_NOTIFY_NOADVANCE(message_complete);
615 0 0 if (parser->state == s_header_field)
617 0 0 if (parser->state == s_header_value)
619 0 0 switch (parser->state) {
635 0 0 for (p=data; p != data + len; p++) {
638 0 0 if (PARSING_HEADER(parser->state)) {
641 0 0 if (parser->nread > HTTP_MAX_HEADER_SIZE) {
654 0 0 if (ch == CR || ch == LF)
0 0 if (ch == CR || ch == LF)
662 0 0 if (ch == CR || ch == LF)
0 0 if (ch == CR || ch == LF)
667 0 0 if (ch == 'H') {
670 0 0 CALLBACK_NOTIFY(message_begin);
0 0 CALLBACK_NOTIFY(message_begin);
0 0 CALLBACK_NOTIFY(message_begin);
0 0 CALLBACK_NOTIFY(message_begin);
681 0 0 if (ch == 'T') {
685 0 0 if (ch != 'E') {
716 0 0 CALLBACK_NOTIFY(message_begin);
0 0 CALLBACK_NOTIFY(message_begin);
0 0 CALLBACK_NOTIFY(message_begin);
0 0 CALLBACK_NOTIFY(message_begin);
721 0 0 STRICT_CHECK(ch != 'T');
726 0 0 STRICT_CHECK(ch != 'T');
731 0 0 STRICT_CHECK(ch != 'P');
736 0 0 STRICT_CHECK(ch != '/');
741 0 0 if (ch < '0' || ch > '9') {
0 0 if (ch < '0' || ch > '9') {
753 0 0 if (ch == '.') {
758 0 0 if (!IS_NUM(ch)) {
0 0 if (!IS_NUM(ch)) {
766 0 0 if (parser->http_major > 999) {
776 0 0 if (!IS_NUM(ch)) {
0 0 if (!IS_NUM(ch)) {
788 0 0 if (ch == ' ') {
793 0 0 if (!IS_NUM(ch)) {
0 0 if (!IS_NUM(ch)) {
801 0 0 if (parser->http_minor > 999) {
811 0 0 if (!IS_NUM(ch)) {
0 0 if (!IS_NUM(ch)) {
812 0 0 if (ch == ' ') {
826 0 0 if (!IS_NUM(ch)) {
0 0 if (!IS_NUM(ch)) {
847 0 0 if (parser->status_code > 999) {
858 0 0 if (ch == CR) {
863 0 0 if (ch == LF) {
870 0 0 STRICT_CHECK(ch != LF);
876 0 0 if (ch == CR || ch == LF)
0 0 if (ch == CR || ch == LF)
881 0 0 if (!IS_ALPHA(ch)) {
0 0 if (!IS_ALPHA(ch)) {
910 0 0 CALLBACK_NOTIFY(message_begin);
0 0 CALLBACK_NOTIFY(message_begin);
0 0 CALLBACK_NOTIFY(message_begin);
0 0 CALLBACK_NOTIFY(message_begin);
918 0 0 if (ch == '\0') {
924 0 0 if (ch == ' ' && matcher[parser->index] == '\0') {
0 0 if (ch == ' ' && matcher[parser->index] == '\0') {
926 0 0 } else if (ch == matcher[parser->index]) {
928 0 0 } else if (parser->method == HTTP_CONNECT) {
929 0 0 if (parser->index == 1 && ch == 'H') {
0 0 if (parser->index == 1 && ch == 'H') {
931 0 0 } else if (parser->index == 2 && ch == 'P') {
0 0 } else if (parser->index == 2 && ch == 'P') {
936 0 0 } else if (parser->method == HTTP_MKCOL) {
937 0 0 if (parser->index == 1 && ch == 'O') {
0 0 if (parser->index == 1 && ch == 'O') {
939 0 0 } else if (parser->index == 1 && ch == 'E') {
0 0 } else if (parser->index == 1 && ch == 'E') {
941 0 0 } else if (parser->index == 1 && ch == '-') {
0 0 } else if (parser->index == 1 && ch == '-') {
943 0 0 } else if (parser->index == 2 && ch == 'A') {
0 0 } else if (parser->index == 2 && ch == 'A') {
948 0 0 } else if (parser->method == HTTP_SUBSCRIBE) {
949 0 0 if (parser->index == 1 && ch == 'E') {
0 0 if (parser->index == 1 && ch == 'E') {
954 0 0 } else if (parser->index == 1 && parser->method == HTTP_POST) {
0 0 } else if (parser->index == 1 && parser->method == HTTP_POST) {
955 0 0 if (ch == 'R') {
957 0 0 } else if (ch == 'U') {
959 0 0 } else if (ch == 'A') {
964 0 0 } else if (parser->index == 2) {
965 0 0 if (parser->method == HTTP_PUT) {
966 0 0 if (ch == 'R') parser->method = HTTP_PURGE;
967 0 0 } else if (parser->method == HTTP_UNLOCK) {
968 0 0 if (ch == 'S') parser->method = HTTP_UNSUBSCRIBE;
970 0 0 } else if (parser->index == 4 && parser->method == HTTP_PROPFIND && ch == 'P') {
0 0 } else if (parser->index == 4 && parser->method == HTTP_PROPFIND && ch == 'P') {
0 0 } else if (parser->index == 4 && parser->method == HTTP_PROPFIND && ch == 'P') {
983 0 0 if (ch == ' ') break;
985 0 0 MARK(url);
986 0 0 if (parser->method == HTTP_CONNECT) {
991 0 0 if (parser->state == s_dead) {
1004 0 0 switch (ch) {
1013 0 0 if (parser->state == s_dead) {
1033 0 0 CALLBACK_DATA(url);
0 0 CALLBACK_DATA(url);
0 0 CALLBACK_DATA(url);
0 0 CALLBACK_DATA(url);
0 0 CALLBACK_DATA(url);
1039 0 0 parser->state = (ch == CR) ?
1042 0 0 CALLBACK_DATA(url);
0 0 CALLBACK_DATA(url);
0 0 CALLBACK_DATA(url);
0 0 CALLBACK_DATA(url);
0 0 CALLBACK_DATA(url);
1046 0 0 if (parser->state == s_dead) {
1068 0 0 STRICT_CHECK(ch != 'T');
1073 0 0 STRICT_CHECK(ch != 'T');
1078 0 0 STRICT_CHECK(ch != 'P');
1083 0 0 STRICT_CHECK(ch != '/');
1089 0 0 if (ch < '1' || ch > '9') {
0 0 if (ch < '1' || ch > '9') {
1101 0 0 if (ch == '.') {
1106 0 0 if (!IS_NUM(ch)) {
0 0 if (!IS_NUM(ch)) {
1114 0 0 if (parser->http_major > 999) {
1124 0 0 if (!IS_NUM(ch)) {
0 0 if (!IS_NUM(ch)) {
1136 0 0 if (ch == CR) {
1141 0 0 if (ch == LF) {
1148 0 0 if (!IS_NUM(ch)) {
0 0 if (!IS_NUM(ch)) {
1156 0 0 if (parser->http_minor > 999) {
1167 0 0 if (ch != LF) {
1178 0 0 if (ch == CR) {
1183 0 0 if (ch == LF) {
1192 0 0 if (!c) {
1197 0 0 MARK(header_field);
1230 0 0 if (c) {
1237 0 0 parser->header_state = (c == 'o' ? h_CO : h_general);
1242 0 0 parser->header_state = (c == 'n' ? h_CON : h_general);
1264 0 0 if (parser->index > sizeof(CONNECTION)-1
1265 0 0 || c != CONNECTION[parser->index]) {
1267 0 0 } else if (parser->index == sizeof(CONNECTION)-2) {
1276 0 0 if (parser->index > sizeof(PROXY_CONNECTION)-1
1277 0 0 || c != PROXY_CONNECTION[parser->index]) {
1279 0 0 } else if (parser->index == sizeof(PROXY_CONNECTION)-2) {
1288 0 0 if (parser->index > sizeof(CONTENT_LENGTH)-1
1289 0 0 || c != CONTENT_LENGTH[parser->index]) {
1291 0 0 } else if (parser->index == sizeof(CONTENT_LENGTH)-2) {
1300 0 0 if (parser->index > sizeof(TRANSFER_ENCODING)-1
1301 0 0 || c != TRANSFER_ENCODING[parser->index]) {
1303 0 0 } else if (parser->index == sizeof(TRANSFER_ENCODING)-2) {
1312 0 0 if (parser->index > sizeof(UPGRADE)-1
1313 0 0 || c != UPGRADE[parser->index]) {
1315 0 0 } else if (parser->index == sizeof(UPGRADE)-2) {
1324 0 0 if (ch != ' ') parser->header_state = h_general;
1334 0 0 if (ch == ':') {
1336 0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
1340 0 0 if (ch == CR) {
1342 0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
1346 0 0 if (ch == LF) {
1348 0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
0 0 CALLBACK_DATA(header_field);
1358 0 0 if (ch == ' ' || ch == '\t') break;
0 0 if (ch == ' ' || ch == '\t') break;
1360 0 0 MARK(header_value);
1365 0 0 if (ch == CR) {
1368 0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
1372 0 0 if (ch == LF) {
1374 0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
1388 0 0 if ('c' == c) {
1396 0 0 if (!IS_NUM(ch)) {
0 0 if (!IS_NUM(ch)) {
1406 0 0 if (c == 'k') {
1409 0 0 } else if (c == 'c') {
1426 0 0 if (ch == CR) {
1428 0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
0 0 CALLBACK_DATA(header_value);
1432 0 0 if (ch == LF) {
1434 0 0 CALLBACK_DATA_NOADVANCE(header_value);
0 0 CALLBACK_DATA_NOADVANCE(header_value);
0 0 CALLBACK_DATA_NOADVANCE(header_value);
0 0 CALLBACK_DATA_NOADVANCE(header_value);
0 0 CALLBACK_DATA_NOADVANCE(header_value);
1453 0 0 if (ch == ' ') break;
1455 0 0 if (!IS_NUM(ch)) {
0 0 if (!IS_NUM(ch)) {
1465 0 0 if (t < parser->content_length || t == ULLONG_MAX) {
0 0 if (t < parser->content_length || t == ULLONG_MAX) {
1477 0 0 if (parser->index > sizeof(CHUNKED)-1
1478 0 0 || c != CHUNKED[parser->index]) {
1480 0 0 } else if (parser->index == sizeof(CHUNKED)-2) {
1488 0 0 if (parser->index > sizeof(KEEP_ALIVE)-1
1489 0 0 || c != KEEP_ALIVE[parser->index]) {
1491 0 0 } else if (parser->index == sizeof(KEEP_ALIVE)-2) {
1499 0 0 if (parser->index > sizeof(CLOSE)-1 || c != CLOSE[parser->index]) {
0 0 if (parser->index > sizeof(CLOSE)-1 || c != CLOSE[parser->index]) {
1501 0 0 } else if (parser->index == sizeof(CLOSE)-2) {
1509 0 0 if (ch != ' ') parser->header_state = h_general;
1522 0 0 STRICT_CHECK(ch != LF);
1545 0 0 if (ch == ' ' || ch == '\t')
0 0 if (ch == ' ' || ch == '\t')
1557 0 0 STRICT_CHECK(ch != LF);
1559 0 0 if (parser->flags & F_TRAILING) {
1561 0 0 parser->state = NEW_MESSAGE();
0 0 parser->state = NEW_MESSAGE();
1562 0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
1570 0 0 (parser->flags & F_UPGRADE || parser->method == HTTP_CONNECT);
0 0 (parser->flags & F_UPGRADE || parser->method == HTTP_CONNECT);
1581 0 0 if (settings->on_headers_complete) {
1596 0 0 if (HTTP_PARSER_ERRNO(parser) != HPE_OK) {
1605 0 0 STRICT_CHECK(ch != LF);
1610 0 0 if (parser->upgrade) {
1611 0 0 parser->state = NEW_MESSAGE();
0 0 parser->state = NEW_MESSAGE();
1612 0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
1616 0 0 if (parser->flags & F_SKIPBODY) {
1617 0 0 parser->state = NEW_MESSAGE();
0 0 parser->state = NEW_MESSAGE();
1618 0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
1619 0 0 } else if (parser->flags & F_CHUNKED) {
1623 0 0 if (parser->content_length == 0) {
1625 0 0 parser->state = NEW_MESSAGE();
0 0 parser->state = NEW_MESSAGE();
1626 0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
1627 0 0 } else if (parser->content_length != ULLONG_MAX) {
1634 0 0 parser->state = NEW_MESSAGE();
0 0 parser->state = NEW_MESSAGE();
1635 0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
1651 0 0 assert(parser->content_length != 0
0 0 assert(parser->content_length != 0
1659 0 0 MARK(body);
1663 0 0 if (parser->content_length == 0) {
1675 0 0 CALLBACK_DATA_(body, p - body_mark + 1, p - data);
0 0 CALLBACK_DATA_(body, p - body_mark + 1, p - data);
0 0 CALLBACK_DATA_(body, p - body_mark + 1, p - data);
0 0 CALLBACK_DATA_(body, p - body_mark + 1, p - data);
0 0 CALLBACK_DATA_(body, p - body_mark + 1, p - data);
1684 0 0 MARK(body);
1690 0 0 parser->state = NEW_MESSAGE();
0 0 parser->state = NEW_MESSAGE();
1691 0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
0 0 CALLBACK_NOTIFY(message_complete);
1696 0 0 assert(parser->nread == 1);
1697 0 0 assert(parser->flags & F_CHUNKED);
1700 0 0 if (unhex_val == -1) {
1714 0 0 assert(parser->flags & F_CHUNKED);
1716 0 0 if (ch == CR) {
1723 0 0 if (unhex_val == -1) {
1724 0 0 if (ch == ';' || ch == ' ') {
0 0 if (ch == ';' || ch == ' ') {
1738 0 0 if (t < parser->content_length || t == ULLONG_MAX) {
0 0 if (t < parser->content_length || t == ULLONG_MAX) {
1749 0 0 assert(parser->flags & F_CHUNKED);
1751 0 0 if (ch == CR) {
1760 0 0 assert(parser->flags & F_CHUNKED);
1761 0 0 STRICT_CHECK(ch != LF);
1765 0 0 if (parser->content_length == 0) {
1779 0 0 assert(parser->flags & F_CHUNKED);
1780 0 0 assert(parser->content_length != 0
0 0 assert(parser->content_length != 0
1786 0 0 MARK(body);
1790 0 0 if (parser->content_length == 0) {
1798 0 0 assert(parser->flags & F_CHUNKED);
1799 0 0 assert(parser->content_length == 0);
1800 0 0 STRICT_CHECK(ch != CR);
1802 0 0 CALLBACK_DATA(body);
0 0 CALLBACK_DATA(body);
0 0 CALLBACK_DATA(body);
0 0 CALLBACK_DATA(body);
0 0 CALLBACK_DATA(body);
1806 0 0 assert(parser->flags & F_CHUNKED);
1807 0 0 STRICT_CHECK(ch != LF);
1829 0 0 assert(((header_field_mark ? 1 : 0) +
1834 0 0 CALLBACK_DATA_NOADVANCE(header_field);
0 0 CALLBACK_DATA_NOADVANCE(header_field);
0 0 CALLBACK_DATA_NOADVANCE(header_field);
0 0 CALLBACK_DATA_NOADVANCE(header_field);
0 0 CALLBACK_DATA_NOADVANCE(header_field);
1835 0 0 CALLBACK_DATA_NOADVANCE(header_value);
0 0 CALLBACK_DATA_NOADVANCE(header_value);
0 0 CALLBACK_DATA_NOADVANCE(header_value);
0 0 CALLBACK_DATA_NOADVANCE(header_value);
0 0 CALLBACK_DATA_NOADVANCE(header_value);
1836 0 0 CALLBACK_DATA_NOADVANCE(url);
0 0 CALLBACK_DATA_NOADVANCE(url);
0 0 CALLBACK_DATA_NOADVANCE(url);
0 0 CALLBACK_DATA_NOADVANCE(url);
0 0 CALLBACK_DATA_NOADVANCE(url);
1837 0 0 CALLBACK_DATA_NOADVANCE(body);
0 0 CALLBACK_DATA_NOADVANCE(body);
0 0 CALLBACK_DATA_NOADVANCE(body);
0 0 CALLBACK_DATA_NOADVANCE(body);
0 0 CALLBACK_DATA_NOADVANCE(body);
1842 0 0 if (HTTP_PARSER_ERRNO(parser) == HPE_OK) {
1854 0 0 if (parser->type == HTTP_REQUEST) {
1859 0 0 if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */
0 0 if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */
1860 0 0 parser->status_code == 204 || /* No Content */
1861 0 0 parser->status_code == 304 || /* Not Modified */
1866 0 0 if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) {
0 0 if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) {
1877 0 0 if (parser->http_major > 0 && parser->http_minor > 0) {
0 0 if (parser->http_major > 0 && parser->http_minor > 0) {
1879 0 0 if (parser->flags & F_CONNECTION_CLOSE) {
1884 0 0 if (!(parser->flags & F_CONNECTION_KEEP_ALIVE)) {
1896 0 0 return ELEM_AT(method_strings, m, "");
1907 0 0 parser->state = (t == HTTP_REQUEST ? s_start_req : (t == HTTP_RESPONSE ? s_start_res : s_start_req_or_res));
0 0 parser->state = (t == HTTP_REQUEST ? s_start_req : (t == HTTP_RESPONSE ? s_start_res : s_start_req_or_res));
1913 0 0 assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0])));
1919 0 0 assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0])));
1928 0 0 if (ch == '@') {
1932 0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
0 0 if (IS_USERINFO_CHAR(ch)) {
1938 0 0 if (ch == '[') {
1942 0 0 if (IS_HOST_CHAR(ch)) {
0 0 if (IS_HOST_CHAR(ch)) {
0 0 if (IS_HOST_CHAR(ch)) {
0 0 if (IS_HOST_CHAR(ch)) {
0 0 if (IS_HOST_CHAR(ch)) {
0 0 if (IS_HOST_CHAR(ch)) {
1949 0 0 if (IS_HOST_CHAR(ch)) {
0 0 if (IS_HOST_CHAR(ch)) {
0 0 if (IS_HOST_CHAR(ch)) {
0 0 if (IS_HOST_CHAR(ch)) {
0 0 if (IS_HOST_CHAR(ch)) {
0 0 if (IS_HOST_CHAR(ch)) {
1955 0 0 if (ch == ':') {
1962 0 0 if (ch == ']') {
1968 0 0 if (IS_HEX(ch) || ch == ':') {
0 0 if (IS_HEX(ch) || ch == ':') {
0 0 if (IS_HEX(ch) || ch == ':') {
0 0 if (IS_HEX(ch) || ch == ':') {
0 0 if (IS_HEX(ch) || ch == ':') {
1976 0 0 if (IS_NUM(ch)) {
0 0 if (IS_NUM(ch)) {
1995 0 0 if (buflen > UINT16_MAX)
2000 0 0 s = found_at ? s_http_userinfo_start : s_http_host_start;
2002 0 0 for (p = buf + u->field_data[UF_HOST].off; p < buf + buflen; p++) {
2005 0 0 if (new_s == s_http_host_dead) {
2011 0 0 if (s != s_http_host) {
2018 0 0 if (s != s_http_host_v6) {
2025 0 0 if (s != s_http_host_port) {
2034 0 0 if (s != s_http_userinfo) {
2049 0 0 switch (s) {
2072 0 0 if (buflen > UINT16_MAX)
2076 0 0 s = is_connect ? s_req_server_start : s_req_spaces_before_url;
2079 0 0 for (p = buf; p < buf + buflen; p++) {
2125 0 0 if (uf == old_uf) {
2139 0 0 if ((u->field_set & ((1 << UF_SCHEMA) | (1 << UF_HOST))) != 0) {
2140 0 0 if (http_parse_host(buf, u, found_at) != 0) {
2146 0 0 if (is_connect && u->field_set != ((1 << UF_HOST)|(1 << UF_PORT))) {
0 0 if (is_connect && u->field_set != ((1 << UF_HOST)|(1 << UF_PORT))) {
2150 0 0 if (u->field_set & (1 << UF_PORT)) {
2155 0 0 if (v > 0xffff) {
2171 0 0 if (HTTP_PARSER_ERRNO(parser) == HPE_OK ||
0 0 if (HTTP_PARSER_ERRNO(parser) == HPE_OK ||
2173 0 0 SET_ERRNO((paused) ? HPE_PAUSED : HPE_OK);