Fix: remove Content-Length from CONNECT response (#1502)

This commit is contained in:
gVisor bot 2021-07-22 18:06:03 +08:00
parent 2aaefba4e3
commit 8928b3d71d

View file

@ -45,6 +45,7 @@ func HandleConn(c net.Conn, in chan<- C.ConnContext, cache *cache.Cache) {
if request.Method == http.MethodConnect { if request.Method == http.MethodConnect {
resp = responseWith(200) resp = responseWith(200)
resp.Status = "Connection established" resp.Status = "Connection established"
resp.ContentLength = -1
if resp.Write(conn) != nil { if resp.Write(conn) != nil {
break // close connection break // close connection