rclone/lib/rest
Nick Craig-Wood a992a910ef rest: use readers.NoCloser to stop body being closed
Before this change, if you passed a io.ReadCloser to opt.Body then the
transaction would close it.  This happens as part of http.NewRequest
which documents that the io.Reader passed in will be upgraded to a
Closer if possible and closed as part of the Do call.

After this change, we wrap any io.ReadClosers to stop them being
upgraded.  This means that they will never get closed and that the
caller should always close them.

This fixes a panic in the googlephotos integration tests.
2019-08-26 12:23:31 +01:00
..
rest.go rest: use readers.NoCloser to stop body being closed 2019-08-26 12:23:31 +01:00
url_test.go build: more pre go1.8 workarounds removed 2019-05-08 15:14:51 +01:00
url.go Move dircache, oauthutil, rest and pacer modules into lib 2018-01-12 17:07:38 +00:00