Skip to content

Commit

Permalink
allow iodata body in s3 requests
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslandoga committed May 9, 2024
1 parent 6af78e0 commit 96d22a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ex_aws/operation/s3.ex
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ defmodule ExAws.Operation.S3 do
defp put_content_length_header(headers, "", :get), do: headers

defp put_content_length_header(headers, body, _) do
Map.put(headers, "content-length", byte_size(body) |> Integer.to_string())
Map.put(headers, "content-length", IO.iodata_length(body) |> Integer.to_string())
end

@spec add_bucket_to_path(operation :: ExAws.Operation.S3.t(), config :: map) ::
Expand Down

0 comments on commit 96d22a1

Please sign in to comment.