Commit 1bbdec69bef50208f77f0c4cbac7c6b56c35973f

Edward Thomson 2019-06-11T21:55:31

http_parser: handle URLs with colon but no port When the end of the host is reached, and we're at the colon separating the host with the port (ie, there is no numeric port) then do not error. This is allowed by RFC 3986.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/deps/http-parser/http_parser.c b/deps/http-parser/http_parser.c
index 27bdd20..cc53a52 100644
--- a/deps/http-parser/http_parser.c
+++ b/deps/http-parser/http_parser.c
@@ -2047,7 +2047,6 @@ http_parse_host(const char * buf, struct http_parser_url *u, int found_at) {
     case s_http_host_start:
     case s_http_host_v6_start:
     case s_http_host_v6:
-    case s_http_host_port_start:
     case s_http_userinfo:
     case s_http_userinfo_start:
       return 1;