Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Force redirects in the HTTP repository
  • Loading branch information
yrashk committed Oct 4, 2012
1 parent 1db35c2 commit 008c053
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/repositories/http.ex
Expand Up @@ -8,7 +8,7 @@ defrecord Expm.Repository.HTTP, url: "https://expm.co", username: nil, password:
{"content-type","text/html"},
{"accept", "text/html"}
],
"", [follow_redirect: true])
"", [follow_redirect: true, force_redirect: true])
{:ok, body, client} = H.body(client)
H.close(client)
body
Expand Down Expand Up @@ -57,7 +57,7 @@ defimpl Expm.Repository, for: Expm.Repository.HTTP do
{"content-type","application/elixir"},
{"accept", "application/elixir"}
],
"", [follow_redirect: true])
"", [follow_redirect: true, force_redirect: true])
{:ok, body, client} = H.body(client)
H.close(client)
case code do
Expand All @@ -74,7 +74,7 @@ defimpl Expm.Repository, for: Expm.Repository.HTTP do
{"content-type","application/elixir"},
{"accept", "application/elixir"}
],
"", [follow_redirect: true])
"", [follow_redirect: true, force_redirect: true])
{:ok, body, client} = H.body(client)
H.close(client)
case code do
Expand All @@ -98,7 +98,7 @@ defimpl Expm.Repository, for: Expm.Repository.HTTP do
{"content-type","application/elixir"},
{"accept", "application/elixir"}
],
spec.encode, [follow_redirect: true])
spec.encode, [follow_redirect: true, force_redirect: true])
{:ok, body, client} = H.body(client)
H.close(client)
case code do
Expand All @@ -115,7 +115,7 @@ defimpl Expm.Repository, for: Expm.Repository.HTTP do
{"content-type","application/elixir"},
{"accept", "application/elixir"}
],
"", [follow_redirect: true])
"", [follow_redirect: true, force_redirect: true])
{:ok, body, client} = H.body(client)
H.close(client)
case code do
Expand All @@ -132,7 +132,7 @@ defimpl Expm.Repository, for: Expm.Repository.HTTP do
{"content-type","application/elixir"},
{"accept", "application/elixir"}
],
filter.encode, [follow_redirect: true])
filter.encode, [follow_redirect: true, force_redirect: true])
{:ok, body, client} = H.body(client)
H.close(client)
case code do
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Expand Up @@ -4,7 +4,7 @@
"erlpass": "ed9b5fa4dcbd81a3e580b0723cfb9eb4709bc817",
"exreloader": "82e1bd157b75ed4a362f128d9d24646f36a586ba",
"genx": "da972d408887c137a538430f0f5b65c1ff2bbf69",
"hackney": "77977858bf833e80abf16a276175320305108eb9",
"hackney": "896fc24e8efb4a5a6966cae13e749ab7cf1f73e2",
"lager": "9981ca0b4d7a57a421f7a6bba71e2087c0d614ed",
"lagerex": "4152858bfb058b9e2fc91cd7df9270ecb621a019",
"mimetypes": "e9dfab5aec98963589ecf13bdfcf0490667a730d",
Expand Down

0 comments on commit 008c053

Please sign in to comment.