Skip to content

escape commas/backslashes in http-header-fields for mpv (macOS + windows)#144

Merged
tapframe merged 1 commit into
NuvioMedia:Devfrom
skoruppa:fix/desktop-header-escaping
Jun 24, 2026
Merged

escape commas/backslashes in http-header-fields for mpv (macOS + windows)#144
tapframe merged 1 commit into
NuvioMedia:Devfrom
skoruppa:fix/desktop-header-escaping

Conversation

@skoruppa

@skoruppa skoruppa commented Jun 23, 2026

Copy link
Copy Markdown
Member

PR type

  • Reproducible bug fix
  • UI glitch/bug fix
  • Behavior bug/regression fix
  • Small maintenance only, with no UI or behavior change
  • Docs accuracy fix
  • Translation/localization only
  • Approved larger or directional change

Why

mpv parses http-header-fields as a comma-separated list. Headers containing commas in values (auth tokens, cookies) are split incorrectly, causing broken authenticated streams that fail to load or return 403.

Desktop scope

macOS (player_bridge.mm) and Windows (player_bridge.cpp). Both join header lines with , but don't escape commas or backslashes in header values.

Issue or approval

Same fix already applied in NuvioTV (commit 108bb6fe) and NuvioMobile (MPVPlayerBridge.swift). This aligns the desktop native bridges.

UI / behavior impact

  • No UI change
  • No behavior change
  • UI changed only to fix a documented glitch/bug
  • Behavior changed only to fix a documented bug/regression
  • UI change has explicit maintainer approval
  • Behavior change has explicit maintainer approval

Policy check

  • I have read and understood CONTRIBUTING.md.
  • This PR is small, focused, and limited to one problem.
  • This PR is scoped to the desktop app, desktop packaging, desktop documentation, or shared code required for desktop behavior.
  • This PR is not cosmetic-only.
  • Any UI change fixes a linked glitch/bug and includes visual proof, or this PR has no UI change.
  • Any behavior change fixes a linked bug/regression or has explicit approval, or this PR has no behavior change.
  • This PR does not bundle unrelated refactors, cleanups, formatting, or drive-by changes.
  • This PR does not add dependencies, architecture changes, migrations, or product-direction changes without explicit approval.
  • I listed the testing performed below.

Scope boundaries

  • Only header escaping logic changed
  • No other mpv options, player logic, or UI touched
  • Linux bridge already fixed in separate PR

Testing

  • Cannot build macOS/Windows on this machine
  • Fix is identical pattern to NuvioTV (tested and merged) and NuvioMobile (shipped)
  • Needs build verification on macOS and Windows

Screenshots / Video

Not a UI change.

Breaking changes

None.

Linked issues

Same root cause as NuvioTV fix (commit 108bb6fe7). No standalone issue - discovered during Linux player implementation #142

… Windows)

mpv parses http-header-fields as a comma-separated list. Headers containing
commas in values (e.g. auth tokens, cookies) were being split incorrectly,
breaking authenticated streams (Real-Debrid, etc.).

Escape \ and , in each header line before joining, matching the fix already
applied in NuvioTV and NuvioMobile.
@skoruppa skoruppa changed the title fix: escape commas/backslashes in http-header-fields for mpv (macOS +… escape commas/backslashes in http-header-fields for mpv (macOS + windows ) Jun 23, 2026
@skoruppa skoruppa changed the title escape commas/backslashes in http-header-fields for mpv (macOS + windows ) escape commas/backslashes in http-header-fields for mpv (macOS + windows) Jun 23, 2026
@tapframe tapframe merged commit 5a03579 into NuvioMedia:Dev Jun 24, 2026
0 of 4 checks passed
aelrased pushed a commit to aelrased/NuvioDesktop that referenced this pull request Jun 29, 2026
…caping

escape commas/backslashes in http-header-fields for mpv (macOS + windows)
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.

2 participants