Skip to content

Commit 025ff19

Browse files
committed
fix: wrong conditional judgment in removeExtraHTTPHostPort
#1939
1 parent f615346 commit 025ff19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

listener/http/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func removeExtraHTTPHostPort(req *http.Request) {
4747
host = req.URL.Host
4848
}
4949

50-
if pHost, port, err := net.SplitHostPort(host); err == nil && (port == "80" || port == "443") {
50+
if pHost, port, err := net.SplitHostPort(host); err == nil && port == "80" {
5151
host = pHost
5252
if ip, err := netip.ParseAddr(pHost); err == nil && ip.Is6() {
5353
// RFC 2617 Sec 3.2.2, for IPv6 literal

0 commit comments

Comments
 (0)