From aac5016b78100971ea5a14dcb059506b60df7984 Mon Sep 17 00:00:00 2001 From: yusing Date: Tue, 2 Sep 2025 22:22:46 +0800 Subject: [PATCH] refactor(httpheaders): replace strutils.SplitComma with strings.SplitSeq --- internal/net/gphttp/httpheaders/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/net/gphttp/httpheaders/utils.go b/internal/net/gphttp/httpheaders/utils.go index 4a032ccd..66a2b80e 100644 --- a/internal/net/gphttp/httpheaders/utils.go +++ b/internal/net/gphttp/httpheaders/utils.go @@ -3,8 +3,8 @@ package httpheaders import ( "net/http" "net/textproto" + "strings" - "github.com/yusing/go-proxy/internal/utils/strutils" "golang.org/x/net/http/httpguts" ) @@ -51,7 +51,7 @@ func UpgradeType(h http.Header) string { func RemoveHopByHopHeaders(h http.Header) { // RFC 7230, section 6.1: Remove headers listed in the "Connection" header. for _, f := range h["Connection"] { - for _, sf := range strutils.SplitComma(f) { + for sf := range strings.SplitSeq(f, ",") { if sf = textproto.TrimString(sf); sf != "" { h.Del(sf) }