Browse Source

stop sending content-length in http CONNECT

Darien Raymond 8 năm trước cách đây
mục cha
commit
db8e09512c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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 {