logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 1236c5dbf55d631b10ad0e73836a2a9cd43ddaa8
parent: 5402d04e3cd2d45472092942fec2c9302c48f64f
Author: kaniini <nenolod@gmail.com>
Date:   Sun,  2 Jun 2019 09:19:15 +0000

Merge branch 'bugfix/reverse-proxy-hackney-wtf' into 'develop'

reverse proxy: clean up some @hackney leftovers

See merge request pleroma/pleroma!1232

Diffstat:

Mlib/pleroma/reverse_proxy.ex6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/pleroma/reverse_proxy.ex b/lib/pleroma/reverse_proxy.ex @@ -61,8 +61,6 @@ defmodule Pleroma.ReverseProxy do * `http`: options for [hackney](https://github.com/benoitc/hackney). """ - @hackney Pleroma.Config.get(:hackney, :hackney) - @default_hackney_options [] @inline_content_types [ @@ -148,7 +146,7 @@ defmodule Pleroma.ReverseProxy do Logger.debug("#{__MODULE__} #{method} #{url} #{inspect(headers)}") method = method |> String.downcase() |> String.to_existing_atom() - case @hackney.request(method, url, headers, "", hackney_opts) do + case :hackney.request(method, url, headers, "", hackney_opts) do {:ok, code, headers, client} when code in @valid_resp_codes -> {:ok, code, downcase_headers(headers), client} @@ -198,7 +196,7 @@ defmodule Pleroma.ReverseProxy do duration, Keyword.get(opts, :max_read_duration, @max_read_duration) ), - {:ok, data} <- @hackney.stream_body(client), + {:ok, data} <- :hackney.stream_body(client), {:ok, duration} <- increase_read_duration(duration), sent_so_far = sent_so_far + byte_size(data), :ok <- body_size_constraint(sent_so_far, Keyword.get(opts, :max_body_size)),