Skip to content

Commit

Permalink
fix: stream! when the client adapter models response headers as lists
Browse files Browse the repository at this point in the history
  • Loading branch information
pepicrft committed Oct 10, 2024
1 parent da4343c commit 9c993e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/ex_aws/s3/download.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ defmodule ExAws.S3.Download do
headers
|> Enum.find(fn {k, _} -> String.downcase(k) == "content-length" end)
|> elem(1)
|> String.to_integer()
|> case do
content_length when is_binary(content_length) ->
content_length |> String.to_integer()

content_length when is_list(content_length) ->
content_length |> List.first() |> String.to_integer()
end
end
end

Expand Down

0 comments on commit 9c993e0

Please sign in to comment.