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

This commit is contained in:
duama 2021-07-22 18:06:03 +08:00 committed by GitHub
parent b3a293ab07
commit 4578b2c826
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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