Repository navigation
Conversation
commit: |
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
This was referenced Nov 10, 2026
Preserve conditional range handling and storage response headers. Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
billf
force-pushed
the
bill/feat/single-range-serving
branch
from
November 11, 2026 00:15
89e72b4 to
e41a4e1
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.
Stack: #49 → #54 → #55 → #56.
Serves a single byte range for static assets, so audio and video can seek, with If-Range and 416 handling.
What this PR contains
parseByteRangeinsrc/mime/mime.tsparses onebytes=range in open-ended, bounded and suffix forms, clamped to the file size. Range unit names are case-insensitive (RFC 9110 §14.1). Multi-range and malformed headers are ignored, which RFC 9110 §14.2 allows. An inverted range is answered 416.ifRangeMatches: a Range applies only when If-Range is a strong match for the current ETag (RFC 9110 §13.1.5). Otherwise the full body is served.blobResponseanswers 206 withContent-Range, 416 for an unsatisfiable range, and sendsAccept-Ranges: byteson full and partial responses.Cache-Control: no-storeand keep the ETag andX-Content-Type-Options: nosniff. An out-of-bounds response for a hashed asset is never cached as immutable.no-storepolicy.Not in this PR
🤖 Generated with Claude Code