From 1f21e31336680740c9d85b1748aac9ca842e7165 Mon Sep 17 00:00:00 2001 From: NanamiNakano Date: Wed, 23 Aug 2023 13:17:26 +0800 Subject: [PATCH] Merge code from upstream Co-authored-by: KallyDev --- pkg/util/tcpmux/httpconnect.go | 2 +- pkg/util/vhost/https.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/util/tcpmux/httpconnect.go b/pkg/util/tcpmux/httpconnect.go index 650891f..4cfbd93 100644 --- a/pkg/util/tcpmux/httpconnect.go +++ b/pkg/util/tcpmux/httpconnect.go @@ -93,7 +93,7 @@ func (muxer *HTTPConnectTCPMuxer) auth(c net.Conn, username, password string, re } func (muxer *HTTPConnectTCPMuxer) getHostFromHTTPConnect(c net.Conn) (net.Conn, map[string]string, error) { - reqInfoMap := make(map[string]string, 0) + reqInfoMap := make(map[string]string) sc, rd := libnet.NewSharedConn(c) host, httpUser, httpPwd, err := muxer.readHTTPConnectRequest(rd) diff --git a/pkg/util/vhost/https.go b/pkg/util/vhost/https.go index e15c190..8862627 100644 --- a/pkg/util/vhost/https.go +++ b/pkg/util/vhost/https.go @@ -36,7 +36,7 @@ func NewHTTPSMuxer(listener net.Listener, timeout time.Duration) (*HTTPSMuxer, e } func GetHTTPSHostname(c net.Conn) (_ net.Conn, _ map[string]string, err error) { - reqInfoMap := make(map[string]string, 0) + reqInfoMap := make(map[string]string) sc, rd := libnet.NewSharedConn(c) clientHello, err := readClientHello(rd)