diff --git a/protocol/http/handshake.go b/protocol/http/handshake.go index 7c95f4d..3607d22 100644 --- a/protocol/http/handshake.go +++ b/protocol/http/handshake.go @@ -75,13 +75,7 @@ func HandleConnection(ctx context.Context, conn net.Conn, reader *std_bufio.Read return handler.NewConnection(ctx, requestConn, metadata) } - keepAlive := strings.TrimSpace(strings.ToLower(request.Header.Get("Proxy-Connection"))) == "keep-alive" - - host := request.Header.Get("Host") - if host != "" { - request.Host = host - } - + keepAlive := !(request.ProtoMajor == 1 && request.ProtoMinor == 0) && strings.TrimSpace(strings.ToLower(request.Header.Get("Proxy-Connection"))) == "keep-alive" request.RequestURI = "" removeHopByHopHeaders(request.Header)