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
21
vendor/github.com/ncw/swift/compatibility_1_6.go
generated
vendored
Normal file
21
vendor/github.com/ncw/swift/compatibility_1_6.go
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
// +build go1.6
|
||||
|
||||
package swift
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
const IS_AT_LEAST_GO_16 = true
|
||||
|
||||
func SetExpectContinueTimeout(tr *http.Transport, t time.Duration) {
|
||||
tr.ExpectContinueTimeout = t
|
||||
}
|
||||
|
||||
func AddExpectAndTransferEncoding(req *http.Request, hasContentLength bool) {
|
||||
req.Header.Add("Expect", "100-continue")
|
||||
if !hasContentLength {
|
||||
req.TransferEncoding = []string{"chunked"}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue