Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ban brackets in CONNECT targets sooner when !Ip::EnableIpv6
This change spills branch changes to CONNECT handling code path but avoids making GET and CONNECT checks more different. AFAICT, the added parseHost() check does not change the end result of parseHost() because our fromHost() check already rejects IPv6 addresses when IPv6 support is disabled. However, it is probably a good idea to reject all bracketed addresses early when IPv6 support is disabled. This clarifies the intent and protects us in case something goes wrong with fromHost() implementation again. In the spirit of this logic, I added an assertion to double check that fromHost() is returning an IPv6 address when our parseHost() check expects one. Context: #1421 (comment)
- Loading branch information