瀏覽代碼

stop sending content-length in http CONNECT

Darien Raymond 8 年之前
父節點
當前提交
db8e09512c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      proxy/http/server.go

+ 1 - 1
proxy/http/server.go

@@ -114,7 +114,7 @@ func (s *Server) handleConnect(ctx context.Context, request *http.Request, reade
 		ProtoMinor:    1,
 		Header:        http.Header(make(map[string][]string)),
 		Body:          nil,
-		ContentLength: 0,
+		ContentLength: -1, // Don't send Content-Length in CONNECT.
 		Close:         false,
 	}
 	if err := response.Write(writer); err != nil {