chore(aws): upgrade aws dependencies
This commit is contained in:
16
vendor/github.com/aws/smithy-go/transport/http/request.go
generated
vendored
16
vendor/github.com/aws/smithy-go/transport/http/request.go
generated
vendored
@@ -130,14 +130,20 @@ func (r *Request) SetStream(reader io.Reader) (rc *Request, err error) {
|
||||
func (r *Request) Build(ctx context.Context) *http.Request {
|
||||
req := r.Request.Clone(ctx)
|
||||
|
||||
if r.stream != nil {
|
||||
req.Body = iointernal.NewSafeReadCloser(ioutil.NopCloser(r.stream))
|
||||
} else {
|
||||
// we update the content-length to 0,
|
||||
// if request stream was not set.
|
||||
if r.stream == nil && req.ContentLength == -1 {
|
||||
req.ContentLength = 0
|
||||
}
|
||||
|
||||
switch stream := r.stream.(type) {
|
||||
case *io.PipeReader:
|
||||
req.Body = ioutil.NopCloser(stream)
|
||||
req.ContentLength = -1
|
||||
default:
|
||||
if r.stream != nil {
|
||||
req.Body = iointernal.NewSafeReadCloser(ioutil.NopCloser(stream))
|
||||
}
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user