Skip to content

Commit

Permalink
fix(scw): read body with unknown content-length (#2406)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codelax authored Jan 31, 2025
1 parent abf9c30 commit c830312
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scw/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (c *Client) do(req *ScalewayRequest, res interface{}) (sdkErr error) {
return sdkErr
}

if res != nil && httpResponse.ContentLength > 0 {
if res != nil && httpResponse.ContentLength != 0 {
contentType := httpResponse.Header.Get("Content-Type")

if strings.HasPrefix(contentType, "application/json") {
Expand Down

0 comments on commit c830312

Please sign in to comment.