diff --git a/go.mod b/go.mod index f9b5ba00dd3..a857f754087 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/Azure/go-autorest/autorest/adal v0.9.23 github.com/davecgh/go-spew v1.1.1 github.com/hashicorp/go-azure-helpers v0.56.0 - github.com/hashicorp/go-retryablehttp v0.7.2 + github.com/hashicorp/go-retryablehttp v0.7.4 github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/go-version v1.6.0 golang.org/x/oauth2 v0.4.0 diff --git a/go.sum b/go.sum index f096a3d2189..8d0e50a0c5e 100644 --- a/go.sum +++ b/go.sum @@ -54,6 +54,10 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= +github.com/hashicorp/go-retryablehttp v0.7.3 h1:5n2R5B7+2YWrtEzIWO2jPPQWseAPLkgIuvUgS1l97KY= +github.com/hashicorp/go-retryablehttp v0.7.3/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= +github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= +github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= diff --git a/sdk/client/client.go b/sdk/client/client.go index 27feb348ea9..a7fea0608e5 100644 --- a/sdk/client/client.go +++ b/sdk/client/client.go @@ -320,12 +320,6 @@ func (c *Client) Execute(ctx context.Context, req *Request) (*Response, error) { var err error - // Ensure the Content-Lenght header is set for methods that define a meaning for enclosed content, i.e. POST and PUT. - // https://www.rfc-editor.org/rfc/rfc9110#section-8.6-5 - if req.Method == "POST" || req.Method == "PUT" { - req.Header.Set("Content-Length", fmt.Sprintf("%d", req.ContentLength)) - } - // Check we can read the request body and set a default empty body var reqBody []byte if req.Body != nil {