aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/http/adapter_helper
AgeCommit message (Collapse)Author
2020-09-08Merge branch 'temp-hackney-fix' into 'develop'rinpatch
temp hackney fix See merge request pleroma/pleroma!2951
2020-09-08Merge branch 'http-fixes' into 'develop'rinpatch
Improvements and fixes for http requests See merge request pleroma/pleroma!2904
2020-07-15Simplify TLS optshref
- `verify_fun` is not useful now - use `customize_check_hostname` (OTP 20+ so OK) - `partial_chain` is useless as of OTP 21.1 (wasn't there, but hackney/.. uses it)
2020-07-15Ensure connections error get known by the callerhref
2020-07-15Request limiter setup: consider {:error, :existing} a successrinpatch
When the application restarts (which happens after certain config changes), the limiters are not destroyed, so `ConcurrentLimiter.new` will produce {:error, :existing}
2020-07-15Gun adapter helper: fix wildcard cert issues on OTP 23rinpatch
See https://bugs.erlang.org/browse/ERL-1260 for more info. The ssl match function is basically copied from mint, except that `:string.lowercase/1` was replaced by `:string.casefold`. It was a TODO in mint's code, so might as well do it since we don't need to support OTP <20. Closes #1834
2020-07-15HTTP: Implement max request limitsrinpatch
2020-07-15Use a custom pool-aware FollowRedirects middlewarerinpatch
2020-07-15Refactor gun pooling and simplify adapter option insertionrinpatch
This patch refactors gun pooling to use Elixir process registry and simplifies adapter option insertion. Having the pool use process registry instead of a GenServer has a number of advantages: - Simpler code: the initial implementation adds about half the lines of code it deletes - Concurrency: unlike a GenServer, ETS-based registry can handle multiple checkout/checkin requests at the same time - Precise and easy idle connection clousure: current proposal for closing idle connections in the GenServer-based pool needs to filter through all connections once a minute and compare their last active time with closing time. With Elixir process registry this can be done by just using `Process.send_after`/`Process.cancel_timer` in the worker process. - Lower memory footprint: In my tests `gun-memory-leak` branch uses about 290mb on peak load (250 connections) and 235mb on idle (5-10 connections). Registry-based pool uses 210mb on idle and 240mb on peak load
2020-05-30hackney adapter helper: support tlsv1.3 and remove custom optsrinpatch
- partitial_chain is no longer exported, but it seems to be the default anyway. - The bug that caused sni to not be sent automatically seems to be fixed - https://github.com/benoitc/hackney/issues/612
2020-03-13more clean upAlexander Strizhakov
2020-03-12clean upAlexander Strizhakov
2020-03-10add verify tls_opts only when we open connectionAlexander Strizhakov
for other requests tesla will add tls_opts
2020-03-06little polishingAlexander Strizhakov
2020-03-06little refactorAlexander Strizhakov
2020-03-04moving some logic to tesla adapterAlexander Strizhakov
- checking original inside gun adapter - flushing streams on max_body error
2020-03-03adapter renaming to adapter_helperAlexander Strizhakov