Skip to content

fix(web): standardize Content-Disposition headers across export routes - #476

Open
albertoperdomo2 wants to merge 3 commits into
mainfrom
fix/content-disposition-consistency
Open

albertoperdomo2 wants to merge 3 commits into
mainfrom
fix/content-disposition-consistency

Conversation

@albertoperdomo2

@albertoperdomo2 albertoperdomo2 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extract contentDispositionHeader() into workspace-attachments.ts — produces RFC 6266 compliant filename= (ASCII-safe) + filename*=UTF-8'' (RFC 5987 encoded) for every download/export route
  • Fix flows/export which was missing the filename*=UTF-8'' extended form entirely
  • Fix skills/export which embedded the raw URL path param name into the quoted filename= without sanitization
  • Fix the RFC 5987 encoding itself: encodeURIComponent doesn't escape ', *, (, ) which are reserved in ext-value syntax — the helper now escapes them

Closes #458

Verification

  • pnpm test — 531 passed, 4 skipped; 5,166 passed, 16 skipped
  • Coverage badges unchanged

OpenSpec

Adds standardize-content-disposition change with a new file-downloads capability spec (openspec/changes/standardize-content-disposition/): one shared RFC 6266/5987 header format for all download/export routes. Validated with openspec validate --strict.

Extract contentDispositionHeader() into workspace-attachments and use
it in files/download, flows/export, and skills/export.  Every route
now emits both the ASCII-safe filename= and the RFC 5987 filename*=
UTF-8 extended form.  The encoder also escapes characters that
encodeURIComponent leaves unencoded but RFC 5987 requires
percent-encoded (single quotes, parens, asterisks).

Closes #458
@albertoperdomo2
albertoperdomo2 force-pushed the fix/content-disposition-consistency branch from c1648e4 to 3b1722c Compare August 28, 2026 21:36
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.

[HN-042] Content-Disposition header inconsistent across download/export routes

1 participant