http3: avoid reinitilising the frame parser on the stream (#5232)

No functional change expected.
This commit is contained in:
Marten Seemann
2025-06-20 13:34:03 +08:00
committed by GitHub
parent f27b056998
commit 7d5e0570c4
6 changed files with 23 additions and 30 deletions

View File

@@ -165,7 +165,7 @@ func (c *Conn) openRequestStream(
rsp := &http.Response{}
trace := httptrace.ContextClientTrace(ctx)
return newRequestStream(
newStream(hstr, c, func(r io.Reader, l uint64) error {
newStream(hstr, c, trace, func(r io.Reader, l uint64) error {
hdr, err := c.decodeTrailers(r, l, maxHeaderBytes)
if err != nil {
return err
@@ -179,7 +179,6 @@ func (c *Conn) openRequestStream(
disableCompression,
maxHeaderBytes,
rsp,
trace,
), nil
}