Skip to content

Commit

Permalink
Merge pull request #275 from tuist/main
Browse files Browse the repository at this point in the history
fix: stream! when the client adapter models response headers as lists
  • Loading branch information
bernardd authored Oct 31, 2024
2 parents 79731f5 + 9c993e0 commit 95f4eaf
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 95f4eaf

Please sign in to comment.