Skip to content

fix: Include Content-Range header in 416 responses#3

Merged
lcian merged 1 commit into
mainfrom
lcian/fix/range-not-satisfiable-content-range
Jun 1, 2026
Merged

fix: Include Content-Range header in 416 responses#3
lcian merged 1 commit into
mainfrom
lcian/fix/range-not-satisfiable-content-range

Conversation

@lcian
Copy link
Copy Markdown
Member

@lcian lcian commented Jun 1, 2026

No description provided.

Per RFC 7233 §4.4 and real GCS behavior, a 416 (Range Not Satisfiable)
response should include Content-Range: bytes */<length> so clients know
the actual object size and can adjust their requests.

The testbench was raising the error before reaching the header-setting
code, so the Content-Range header was never included. Fix by threading
the object length through range_not_satisfiable() and RestException.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lcian lcian marked this pull request as ready for review June 1, 2026 15:08
@lcian lcian merged commit b21e850 into main Jun 1, 2026
18 of 19 checks passed
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