forked from quic-go/quic-go
http3: set ContentLength to -1 if no Content-Length header is set (#4645)
This applies to both the http.Response and the http.Request.
This commit is contained in:
@@ -289,6 +289,7 @@ var _ = Describe("HTTP tests", func() {
|
||||
Expect(resp.StatusCode).To(Equal(200))
|
||||
body, err := io.ReadAll(gbytes.TimeoutReader(resp.Body, 20*time.Second))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(resp.ContentLength).To(BeEquivalentTo(-1))
|
||||
Expect(body).To(Equal(PRDataLong))
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user