diff --git a/lib/ex_aws/sqs/request.ex b/lib/ex_aws/sqs/request.ex index fbac3d4b..63ba6d6f 100644 --- a/lib/ex_aws/sqs/request.ex +++ b/lib/ex_aws/sqs/request.ex @@ -14,14 +14,18 @@ defmodule ExAws.SQS.Request do ExAws.Request.request(:post, url(client.config, queue_name), query, headers, client) end - def url(%{scheme: scheme, host: host}, queue_name) do + def url(%{scheme: scheme, host: host, port: port}, queue_name) do [ scheme, host, + port |> port(), queue_name |> with_slash ] |> IO.iodata_to_binary end + defp port(80), do: "" + defp port(p), do: ":#{p}" + def with_slash(""), do: "/" def with_slash(queue), do: ["/", queue] diff --git a/mix.exs b/mix.exs index e9f9ab47..e096d035 100644 --- a/mix.exs +++ b/mix.exs @@ -86,7 +86,8 @@ defmodule ExAws.Mixfile do sqs: [ scheme: "https://", host: {"$region", "sqs.$region.amazonaws.com"}, - region: "us-east-1" + region: "us-east-1", + port: 80 ] ] end diff --git a/mix.lock b/mix.lock index f69af545..0c841da2 100644 --- a/mix.lock +++ b/mix.lock @@ -3,7 +3,7 @@ "hackney": {:hex, :hackney, "1.2.0"}, "httpoison": {:hex, :httpoison, "0.7.0"}, "httpotion": {:hex, :httpotion, "2.0.0"}, - "ibrowse": {:git, "git://github.com/cmullaparthi/ibrowse.git", "ea3305d21f37eced4fac290f64b068e56df7de80", [tag: "v4.1.2"]}, + "ibrowse": {:git, "https://github.com/cmullaparthi/ibrowse.git", "ea3305d21f37eced4fac290f64b068e56df7de80", [tag: "v4.1.2"]}, "idna": {:hex, :idna, "1.0.2"}, "jsx": {:hex, :jsx, "2.5.3"}, "mixunit": {:hex, :mixunit, "0.9.2"},