mirror of
https://github.com/restic/restic.git
synced 2025-08-22 16:07:48 +00:00
debug: Fix EOF detection in HTTP transport
This commit is contained in:
@@ -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)
|
||||
if res != nil && res.Body != nil {
|
||||
res.Body = &eofDetectReader{rd: res.Body}
|
||||
}
|
||||
return res, err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user