vendor: update github.com/ncw/swift to help with #3041

This commit is contained in:
Nick Craig-Wood 2019-03-19 13:27:46 +00:00
parent 2065e73d0b
commit b0380aad95
5 changed files with 17 additions and 12 deletions

View file

@ -14,7 +14,9 @@ func SetExpectContinueTimeout(tr *http.Transport, t time.Duration) {
}
func AddExpectAndTransferEncoding(req *http.Request, hasContentLength bool) {
req.Header.Add("Expect", "100-continue")
if req.Body != nil {
req.Header.Add("Expect", "100-continue")
}
if !hasContentLength {
req.TransferEncoding = []string{"chunked"}
}