Skip to content

Commit 048a7b8

Browse files
committed
HTTP/3->HTTP/2 downgrade: reset body reader
Since the first attempt consumed it.
1 parent cef59de commit 048a7b8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

dnscrypt-proxy/xtransport.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,9 @@ func (xTransport *XTransport) Fetch(
729729

730730
// Retry with HTTP/2
731731
client.Transport = xTransport.transport
732+
if body != nil {
733+
req.Body = io.NopCloser(bytes.NewReader(*body))
734+
}
732735
start = time.Now()
733736
resp, err = client.Do(req)
734737
rtt = time.Since(start)

0 commit comments

Comments
 (0)