fix(web): standardize Content-Disposition headers across export routes - #476
Open
albertoperdomo2 wants to merge 3 commits into
Open
albertoperdomo2 wants to merge 3 commits into
albertoperdomo2 wants to merge 3 commits into
Conversation
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
force-pushed
the
fix/content-disposition-consistency
branch
from
August 28, 2026 21:36
c1648e4 to
3b1722c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
contentDispositionHeader()intoworkspace-attachments.ts— produces RFC 6266 compliantfilename=(ASCII-safe) +filename*=UTF-8''(RFC 5987 encoded) for every download/export routeflows/exportwhich was missing thefilename*=UTF-8''extended form entirelyskills/exportwhich embedded the raw URL path paramnameinto the quotedfilename=without sanitizationencodeURIComponentdoesn't escape',*,(,)which are reserved inext-valuesyntax — the helper now escapes themCloses #458
Verification
pnpm test— 531 passed, 4 skipped; 5,166 passed, 16 skippedOpenSpec
Adds
standardize-content-dispositionchange with a newfile-downloadscapability spec (openspec/changes/standardize-content-disposition/): one shared RFC 6266/5987 header format for all download/export routes. Validated withopenspec validate --strict.