http3: add request to response (#3608)

This commit is contained in:
David Brouwer
2022-11-02 21:39:34 +01:00
committed by GitHub
parent af30cef57c
commit 047f9b6ffa
2 changed files with 2 additions and 0 deletions

View File

@@ -390,6 +390,7 @@ func (c *client) doRequest(req *http.Request, str quic.Stream, opt RoundTripOpt,
ProtoMajor: 3,
Header: http.Header{},
TLS: &connState,
Request: req,
}
for _, hf := range hfs {
switch hf.Name {

View File

@@ -741,6 +741,7 @@ var _ = Describe("Client", func() {
Expect(rsp.Proto).To(Equal("HTTP/3.0"))
Expect(rsp.ProtoMajor).To(Equal(3))
Expect(rsp.StatusCode).To(Equal(418))
Expect(rsp.Request).ToNot(BeNil())
})
It("doesn't close the request stream, with DontCloseRequestStream set", func() {