Skip to content

fix: bump http.client._MAXHEADERS to 1000 to prevent CDN header drops - #1033

Open
NicoleXeon wants to merge 1 commit into
nathom:devfrom
NicoleXeon:fix-http-maxheaders
Open

NicoleXeon wants to merge 1 commit into
nathom:devfrom
NicoleXeon:fix-http-maxheaders

Conversation

@NicoleXeon

Copy link
Copy Markdown

Problem

Certain CDNs (notably Akamai/Qobuz edge nodes on high-profile releases like https://open.qobuz.com/track/212116885) return over 100 response headers, primarily bloated cookie and telemetry headers.

Because Python's standard http.client hardcodes an internal limit of 100 headers (_MAXHEADERS = 100), requests abort immediately with:

ERROR    Error downloading track: ('Connection aborted.', HTTPException('got more than 100 headers'))
ERROR    Error processing media item: file said 4 bytes, read 0 bytes

Solution

Increases http.client._MAXHEADERS to 1000 in streamrip/init.py during startup, allowing requests to complete successfully across all affected CDN endpoints without breaking downloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant