diff --git a/pkg/proxy/fast/connpool.go b/pkg/proxy/fast/connpool.go index f2efc88b6..f6357c59d 100644 --- a/pkg/proxy/fast/connpool.go +++ b/pkg/proxy/fast/connpool.go @@ -179,7 +179,6 @@ func (c *conn) handleResponse(r rwWithUpgrade) error { } res.Reset() - res.Header.Reset() res.Header.SetNoDefaultContentType(true) continue @@ -216,7 +215,7 @@ func (c *conn) handleResponse(r rwWithUpgrade) error { return nil } - hasContentLength := res.Header.Peek("Content-Length") != nil + hasContentLength := len(res.Header.Peek("Content-Length")) > 0 if hasContentLength && res.Header.ContentLength() == 0 { return nil diff --git a/pkg/proxy/fast/proxy_test.go b/pkg/proxy/fast/proxy_test.go index 563f411c1..4c4c158b1 100644 --- a/pkg/proxy/fast/proxy_test.go +++ b/pkg/proxy/fast/proxy_test.go @@ -307,8 +307,6 @@ func TestHeadRequest(t *testing.T) { } func TestNoContentLengthResponse(t *testing.T) { - t.Skip("Waiting for a fix") - backendListener, err := net.Listen("tcp", ":0") require.NoError(t, err)