From 4578b2c82635ac76df26a8ab0bbf0fba4c24a851 Mon Sep 17 00:00:00 2001 From: duama <30264485+duament@users.noreply.github.com> Date: Thu, 22 Jul 2021 18:06:03 +0800 Subject: [PATCH] Fix: remove Content-Length from CONNECT response (#1502) --- listener/http/proxy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/listener/http/proxy.go b/listener/http/proxy.go index 12508ba..9ac95cb 100644 --- a/listener/http/proxy.go +++ b/listener/http/proxy.go @@ -45,6 +45,7 @@ func HandleConn(c net.Conn, in chan<- C.ConnContext, cache *cache.Cache) { if request.Method == http.MethodConnect { resp = responseWith(200) resp.Status = "Connection established" + resp.ContentLength = -1 if resp.Write(conn) != nil { break // close connection