diff options
author | Mark Felder <feld@feld.me> | 2024-01-28 10:20:44 -0500 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2024-01-28 14:22:35 -0500 |
commit | 563aebd5ce8e713dec2cb7ce47dbc7fc04473266 (patch) | |
tree | 2f430b710972798491df59de6d04b77de14d4ae8 | |
parent | 60d89cb40455f9f70b683849dd95311975b0b6f7 (diff) | |
download | pleroma-563aebd5ce8e713dec2cb7ce47dbc7fc04473266.tar.gz pleroma-563aebd5ce8e713dec2cb7ce47dbc7fc04473266.zip |
Pleroma.Web.Plugs.UploadedMedia: dialyzer error
lib/pleroma/web/plugs/uploaded_media.ex:98:call
The function call will not succeed.
Pleroma.ReverseProxy.call(
_conn :: %Plug.Conn{
:adapter => {atom(), _},
:assigns => %{atom() => _},
:body_params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
:cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
:halted => boolean(),
:host => binary(),
:method => binary(),
:owner => pid(),
:params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
:path_info => [binary()],
:path_params => %{binary() => binary() | [any()] | map()},
:port => char(),
:private => %{atom() => _},
:query_params => %Plug.Conn.Unfetched{
:aspect => atom(),
binary() => binary() | [any()] | map()
},
:query_string => binary(),
:remote_ip =>
{byte(), byte(), byte(), byte()}
| {char(), char(), char(), char(), char(), char(), char(), char()},
:req_cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => binary()},
:req_headers => [{_, _}],
:request_path => binary(),
:resp_body =>
nil
| binary()
| maybe_improper_list(
binary() | maybe_improper_list(any(), binary() | []) | byte(),
binary() | []
),
:resp_cookies => %{binary() => map()},
:resp_headers => [{_, _}],
:scheme => :http | :https,
:script_name => [binary()],
:secret_key_base => nil | binary(),
:state =>
:chunked | :file | :sent | :set | :set_chunked | :set_file | :unset | :upgraded,
:status => nil | non_neg_integer()
},
_url :: any(),
_proxy_opts :: [{:http, [{:follow_redirect, true} | {:pool, :upload}, ...]}, ...]
)
breaks the contract
(Plug.Conn.t(), url :: String.t(), [option()]) :: Plug.Conn.t()
-rw-r--r-- | lib/pleroma/reverse_proxy.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/reverse_proxy.ex b/lib/pleroma/reverse_proxy.ex index 35b0e608c..cc4530010 100644 --- a/lib/pleroma/reverse_proxy.ex +++ b/lib/pleroma/reverse_proxy.ex @@ -84,13 +84,13 @@ defmodule Pleroma.ReverseProxy do {:max_read_duration, non_neg_integer() | :infinity} | {:max_body_length, non_neg_integer() | :infinity} | {:failed_request_ttl, non_neg_integer() | :infinity} - | {:http, []} + | {:http, keyword()} | {:req_headers, [{String.t(), String.t()}]} | {:resp_headers, [{String.t(), String.t()}]} - | {:inline_content_types, boolean() | [String.t()]} + | {:inline_content_types, boolean() | list(String.t())} | {:redirect_on_failure, boolean()} - @spec call(Plug.Conn.t(), url :: String.t(), [option()]) :: Plug.Conn.t() + @spec call(Plug.Conn.t(), String.t(), list(option())) :: Plug.Conn.t() def call(_conn, _url, _opts \\ []) def call(conn = %{method: method}, url, opts) when method in @methods do |