Skip to content

[Feature] Range requests / byte serving for static files (Accept-Ranges, 206, If-Range) #809

Description

@pathosDev

Problem

Static file serving already does conditional GET — weak ETag + If-None-Match and Last-Modified + If-Modified-Since (src/http/static/StaticFiles.ts:35-50, options in StaticFilesOptions.ts) — but no Range support: no Accept-Ranges advertisement, no 206/Content-Range, no If-Range, no 416. Video/audio seeking and resumable downloads do not work against actor-ts static routes.

Proposal

  • Advertise Accept-Ranges: bytes; serve single ranges (bytes=start-end, suffix ranges) with 206 + Content-Range
  • 416 with Content-Range: bytes */size on unsatisfiable ranges
  • If-Range honored against the existing weak ETag / Last-Modified
  • Single-range only initially; multipart/byteranges explicitly out of scope (say so in docs)
  • Land on the same read path as [Feature] Stream large static files without buffering into memory #465 (stream large files without buffering) — Range + streaming belong together

Acceptance sketch

  • Range/suffix requests served correctly for files and directory-served files on all three runtimes
  • 416 semantics and If-Range fallback covered by tests
  • EN + DE docs note the single-range scope

Relates to #465, #575.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: lowNice-to-have / niche / demand-drivenproduction-goalBlocks or defines the path to production readiness

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions