mirror of
https://github.com/restic/restic.git
synced 2026-10-11 04:27:12 +00:00
debug: Fix EOF detection in HTTP transport
This commit is contained in:
1 parent
6301620428
commit
d3c06c39f9
1 file changed
+3
-1
@@ -52,7 +52,9 @@ func (rd *eofDetectReader) Close() error {
|
||||
|
||||
func (tr eofDetectRoundTripper) RoundTrip(req *http.Request) (res *http.Response, err error) {
|
||||
res, err = tr.RoundTripper.RoundTrip(req)
|
||||
res.Body = &eofDetectReader{rd: res.Body}
|
||||
if res != nil && res.Body != nil {
|
||||
res.Body = &eofDetectReader{rd: res.Body}
|
||||
}
|
||||
return res, err
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user