correct pool and uniform headers format

This commit is contained in:
Alexander Strizhakov 2020-09-02 09:16:51 +03:00
commit 79f65b4374
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
6 changed files with 14 additions and 10 deletions

View file

@ -96,6 +96,6 @@ defmodule Pleroma.Web.RichMedia.Helpers do
@rich_media_options
end
Pleroma.HTTP.get(url, headers, options)
Pleroma.HTTP.get(url, headers, adapter: options)
end
end

View file

@ -136,12 +136,12 @@ defmodule Pleroma.Web.WebFinger do
def find_lrdd_template(domain) do
with {:ok, %{status: status, body: body}} when status in 200..299 <-
HTTP.get("http://#{domain}/.well-known/host-meta", []) do
HTTP.get("http://#{domain}/.well-known/host-meta") do
get_template_from_xml(body)
else
_ ->
with {:ok, %{body: body, status: status}} when status in 200..299 <-
HTTP.get("https://#{domain}/.well-known/host-meta", []) do
HTTP.get("https://#{domain}/.well-known/host-meta") do
get_template_from_xml(body)
else
e -> {:error, "Can't find LRDD template: #{inspect(e)}"}