studio-b12 / gowebdav

A golang WebDAV client library and command line tool.
BSD 3-Clause "New" or "Revised" License
309 stars 89 forks source link

Set GetBody on http.Request #53

Closed jkowalski closed 2 years ago

jkowalski commented 2 years ago

A user of Kopia reported this error in https://github.com/kopia/kopia/issues/1509:

Propfind "https://myhost.mydomain.com/kopia/p5f/7be/": http2: Transport: cannot retry err [http2: Transport received Serv
er's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error

There appears to be an issue with some proxy servers that force connection closure after receiving the request and Go cannot automatically retry the request unless http.Request.GetBody is set.

Could this be added in gowebdav ?

chripo commented 2 years ago

There might be some relation with 2889239

chripo commented 2 years ago

We don't redefine Request and the function is already implemented in https://pkg.go.dev/net/http#Request