Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
b104348f
Commit
b104348f
authored
May 02, 2017
by
lain
Browse files
Follow webfinger redirects.
parent
96014f8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/web_finger/web_finger.ex
View file @
b104348f
...
...
@@ -92,7 +92,7 @@ def finger(account, getter \\ &HTTPoison.get/3) do
response
=
with
{
:ok
,
result
}
<-
getter
.
(
"https:"
<>
address
,
[
"Accept"
:
"application/xrd+xml"
],
[
params:
[
resource:
account
]])
do
{
:ok
,
result
}
else
_
->
getter
.
(
"http:"
<>
address
,
[
"Accept"
:
"application/xrd+xml"
],
[
params:
[
resource:
account
]])
getter
.
(
"http:"
<>
address
,
[
"Accept"
:
"application/xrd+xml"
],
[
params:
[
resource:
account
]
,
follow_redirect:
true
])
end
with
{
:ok
,
%{
status_code:
status_code
,
body:
body
}}
when
status_code
in
200
..
299
<-
response
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment