Open ethomson opened 5 years ago
cc @nodejs/http : are we aware of any possible side effects that might happen in Node.js after landing this?
@ethomson thank you for an excellent PR! The change looks great. It has to be considered in the context of Node.js too, however. Let's wait for @nodejs/http to get better understanding of interactions of this PR and Node core.
As a side note, I wonder if libgit2 might be interested in using llhttp instead of http_parser
? The former is faster and verifiable, and is already used in the latest Node.js.
Interesting...! Thanks for the pointer @indutny. I’ll take a look, particularly since I’m interested in pausing in my on_headers_complete
callback. Would you happen to know offhand if llhttp fixes #97 or if that’s still an issue?
@nodejs/http, ping.
@nodejs/http
When parsing URLs, treat an empty port (eg
http://hostname:/
) as if it were unspecified. RFC 3986 says:(Emphasis mine.) This indicates that URIs MAY be produced with an empty port and the
:
delimiter.Thus, we stop failing if we end host parsing at the port delimiter.