mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
fix: wrong conditional judgment in removeExtraHTTPHostPort
https://github.com/MetaCubeX/mihomo/issues/1939
This commit is contained in:
@@ -47,7 +47,7 @@ func removeExtraHTTPHostPort(req *http.Request) {
|
||||
host = req.URL.Host
|
||||
}
|
||||
|
||||
if pHost, port, err := net.SplitHostPort(host); err == nil && (port == "80" || port == "443") {
|
||||
if pHost, port, err := net.SplitHostPort(host); err == nil && port == "80" {
|
||||
host = pHost
|
||||
if ip, err := netip.ParseAddr(pHost); err == nil && ip.Is6() {
|
||||
// RFC 2617 Sec 3.2.2, for IPv6 literal
|
||||
|
||||
Reference in New Issue
Block a user