forked from TrueCloudLab/rclone
vendor: pull in github.com/ncw/swift latest to fix reauth on big files
This commit is contained in:
parent
1c01d0b84a
commit
039e2a9649
7 changed files with 50 additions and 5 deletions
13
vendor/github.com/ncw/swift/swift.go
generated
vendored
13
vendor/github.com/ncw/swift/swift.go
generated
vendored
|
@ -423,12 +423,15 @@ func (c *Connection) setDefaults() {
|
|||
c.Timeout = 60 * time.Second
|
||||
}
|
||||
if c.Transport == nil {
|
||||
c.Transport = &http.Transport{
|
||||
t := &http.Transport{
|
||||
// TLSClientConfig: &tls.Config{RootCAs: pool},
|
||||
// DisableCompression: true,
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
MaxIdleConnsPerHost: 2048,
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
// Half of linux's default open files limit (1024).
|
||||
MaxIdleConnsPerHost: 512,
|
||||
}
|
||||
SetExpectContinueTimeout(t, 5*time.Second)
|
||||
c.Transport = t
|
||||
}
|
||||
if c.client == nil {
|
||||
c.client = &http.Client{
|
||||
|
@ -720,6 +723,10 @@ func (c *Connection) Call(targetUrl string, p RequestOpts) (resp *http.Response,
|
|||
}
|
||||
req.Header.Add("User-Agent", c.UserAgent)
|
||||
req.Header.Add("X-Auth-Token", authToken)
|
||||
|
||||
_, hasCL := p.Headers["Content-Length"]
|
||||
AddExpectAndTransferEncoding(req, hasCL)
|
||||
|
||||
resp, err = c.doTimeoutRequest(timer, req)
|
||||
if err != nil {
|
||||
if (p.Operation == "HEAD" || p.Operation == "GET") && retries > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue