Skip to content

Commit

Permalink
put_aws_sigv4: Fix service detection on empty host
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Jul 26, 2024
1 parent 7e164e0 commit a01b032
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/req/steps.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ defmodule Req.Steps do
end

defp detect_aws_service(%URI{} = url) do
parts = url.host |> String.split(".") |> Enum.reverse()
parts = (url.host || "") |> String.split(".") |> Enum.reverse()

with ["com", "amazonaws" | rest] <- parts do
case rest do
Expand Down

0 comments on commit a01b032

Please sign in to comment.