add a http3.Hijacker that allows stream creation on a QUIC session from a http.Response.Body

This commit is contained in:
Marten Seemann 2022-03-22 09:34:11 +01:00
parent 332473668a
commit 57461e01b5
3 changed files with 38 additions and 8 deletions

View file

@ -316,7 +316,7 @@ func (c *client) doRequest(
res.Header.Add(hf.Name, hf.Value)
}
}
respBody := newResponseBody(str, reqDone, func() {
respBody := newResponseBody(str, c.conn, reqDone, func() {
c.conn.CloseWithError(quic.ApplicationErrorCode(errorFrameUnexpected), "")
})