moving some logic to tesla adapter
- checking original inside gun adapter - flushing streams on max_body error
This commit is contained in:
parent
22d52f5691
commit
d6bebd4f9c
6 changed files with 6 additions and 34 deletions
|
|
@ -35,8 +35,6 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
|
|||
{&:ssl_verify_hostname.verify_fun/3, [check_hostname: 'example.com']}
|
||||
|
||||
assert File.exists?(tls_opts[:cacertfile])
|
||||
|
||||
assert opts[:original] == "example.com:443"
|
||||
end
|
||||
|
||||
test "https ipv4 with default port" do
|
||||
|
|
@ -46,8 +44,6 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
|
|||
|
||||
assert opts[:tls_opts][:verify_fun] ==
|
||||
{&:ssl_verify_hostname.verify_fun/3, [check_hostname: '127.0.0.1']}
|
||||
|
||||
assert opts[:original] == "127.0.0.1:443"
|
||||
end
|
||||
|
||||
test "https ipv6 with default port" do
|
||||
|
|
@ -58,8 +54,6 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
|
|||
assert opts[:tls_opts][:verify_fun] ==
|
||||
{&:ssl_verify_hostname.verify_fun/3,
|
||||
[check_hostname: '2a03:2880:f10c:83:face:b00c:0:25de']}
|
||||
|
||||
assert opts[:original] == "2a03:2880:f10c:83:face:b00c:0:25de:443"
|
||||
end
|
||||
|
||||
test "https url with non standart port" do
|
||||
|
|
@ -129,7 +123,6 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
|
|||
assert tls_opts[:depth] == 20
|
||||
assert tls_opts[:reuse_sessions] == false
|
||||
|
||||
assert opts[:original] == "some-domain.com:443"
|
||||
assert opts[:close_conn] == false
|
||||
assert is_pid(opts[:conn])
|
||||
end
|
||||
|
|
|
|||
|
|
@ -134,7 +134,6 @@ defmodule Pleroma.HTTP.ConnectionTest do
|
|||
assert tls_opts[:depth] == 20
|
||||
assert tls_opts[:reuse_sessions] == false
|
||||
|
||||
assert opts[:original] == "some-domain.com:443"
|
||||
assert opts[:close_conn] == false
|
||||
assert is_pid(opts[:conn])
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue