fix: disable HTTP/2 and HTTP/3 multiplexing in pling upload script
The Pling/OpenDesktop file upload servers (`files07.pling.com`) do not properly handle HTTP/2 multiplexed file uploads from newer HTTP clients like `niquests`, causing `ConnectionError` and `500` status codes on push. Disabling HTTP/2 and HTTP/3 explicitly avoids these connection drops.
This commit is contained in:
@@ -512,7 +512,7 @@ def resolve_runtime_config(args: argparse.Namespace) -> RuntimeConfig:
|
|||||||
|
|
||||||
|
|
||||||
def create_session(base_url: str) -> SessionLike:
|
def create_session(base_url: str) -> SessionLike:
|
||||||
session = cast(SessionLike, cast(object, niquests.Session()))
|
session = cast(SessionLike, cast(object, niquests.Session(disable_http2=True, disable_http3=True)))
|
||||||
session.headers.update(
|
session.headers.update(
|
||||||
{
|
{
|
||||||
"User-Agent": (
|
"User-Agent": (
|
||||||
|
|||||||
Reference in New Issue
Block a user