mirror of
https://github.com/rclone/rclone.git
synced 2025-08-13 15:37:26 +02:00
Add context to all http.NewRequest #3257
When we drop support for go1.12 we can use http.NewRequestWithContext
This commit is contained in:
@ -1007,6 +1007,7 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Read
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req = req.WithContext(ctx) // go1.13 can use NewRequestWithContext
|
||||
fs.FixRangeOption(options, o.bytes)
|
||||
fs.OpenOptionAddHTTPHeaders(req.Header, options)
|
||||
var res *http.Response
|
||||
|
Reference in New Issue
Block a user