Skip to content

feat: name byte-path file downloads via Content-Disposition - #72

Merged
william0wang merged 1 commit into
mainfrom
feat/file-download-disposition
Aug 23, 2026
Merged

feat: name byte-path file downloads via Content-Disposition#72
william0wang merged 1 commit into
mainfrom
feat/file-download-disposition

Conversation

@william0wang

Copy link
Copy Markdown
Owner

Summary

  • Remote file endpoint: byte-path responses (HEAD + GET) now send a
    Content-Disposition: inline header carrying the real filename.
  • The URL basename is always "file" (the name lives in a query param), so
    browser direct-downloads previously saved nameless.
  • Non-ASCII names survive via the RFC 6266/5987 filename* form; the ASCII
    fallback degrades to underscores. Quoting/CR/LF are sanitized (no header
    injection).
  • Line windows (viewer-internal partial views) intentionally stay unnamed.

Test plan

  • New case in tests/remote-file-endpoint.test.ts: ASCII name, non-ASCII
    (中文) name, and line-window exclusion; requests go through the hub
    proxy, proving the header survives proxying.
  • Full suite 690/690, tsc --noEmit, prettier clean.

Release 0.11.6.

@william0wang
william0wang merged commit 85d8c42 into main Aug 23, 2026
1 check passed
@william0wang
william0wang deleted the feat/file-download-disposition branch August 23, 2026 05: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.

1 participant