Skip to content

Return 416 for unsatisfiable byte ranges. - #97

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
return-range-not-satisfiable
Aug 17, 2026
Merged

Return 416 for unsatisfiable byte ranges.#97
samuel-williams-shopify merged 1 commit into
mainfrom
return-range-not-satisfiable

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Summary

Return 416 Range Not Satisfiable when a valid static file byte-range request contains no satisfiable ranges. Include Content-Range: bytes */<size> and an empty response body.

Continue returning the complete file with 200 OK for unsupported multiple satisfiable ranges.

Testing

  • bundle exec sus test/utopia/static.rb
  • bundle exec rubocop lib/utopia/static/local_file.rb test/utopia/static.rb
  • Full suite: 485 tests pass; four generated-site tests fail locally because the generated bundle cannot resolve protocol-url ~> 0.18 from the local gem cache.

Assisted-By: devx/cbdeae41-9308-4071-ad53-58cd92db2946
@samuel-williams-shopify
samuel-williams-shopify merged commit 0a3e36b into main Aug 17, 2026
36 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the return-range-not-satisfiable branch August 17, 2026 08:32
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