From 6e66bb35d1c2ab87e65e3249fbb427b80ca5b015 Mon Sep 17 00:00:00 2001 From: Alex S Date: Thu, 22 Aug 2019 12:37:33 +0300 Subject: [PATCH] was used with hackney --- lib/pleroma/http/http.ex | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/pleroma/http/http.ex b/lib/pleroma/http/http.ex index da86ebcc7..5c0d66955 100644 --- a/lib/pleroma/http/http.ex +++ b/lib/pleroma/http/http.ex @@ -28,9 +28,7 @@ defmodule Pleroma.HTTP do """ def request(method, url, body \\ "", headers \\ [], options \\ []) do try do - options = - process_request_options(options) - |> process_sni_options(url) + options = process_request_options(options) adapter_gun? = Application.get_env(:tesla, :adapter) == Tesla.Adapter.Gun @@ -65,21 +63,6 @@ defmodule Pleroma.HTTP do end end - defp process_sni_options(options, nil), do: options - - defp process_sni_options(options, url) do - uri = URI.parse(url) - host = uri.host |> to_charlist() - - case uri.scheme do - "https" -> - options ++ [ssl: [server_name_indication: host]] - - _ -> - options - end - end - def process_request_options(options) do Keyword.merge(Pleroma.HTTP.Connection.options([]), options) end