fix(http): make Hackney use HTTP/1.1 only

Hackney 4 negotiates HTTP/2 and shares one connection per host. The
media proxy closes a response with :hackney.close/1, which stops the
whole connection, so parallel downloads from one host broke each other.
This commit is contained in:
Lain Soykaf 2026-10-22 16:24:47 +04:00
commit e52ba68303
No known key found for this signature in database
3 changed files with 11 additions and 0 deletions

View file

@ -13,6 +13,12 @@ defmodule Pleroma.HTTP.AdapterHelper.HackneyTest do
{:ok, uri: uri}
end
# Hackney 4 shares one HTTP/2 connection per host, and closing a response
# stops that connection for every stream on it.
test "Hackney only speaks HTTP/1.1" do
assert :hackney_util.default_protocols() == [:http1]
end
describe "options/2" do
setup do: clear_config([:http, :adapter], a: 1, b: 2)