Skip to content

Ignore malformed static byte ranges. - #100

Closed
samuel-williams-shopify wants to merge 1 commit into
mainfrom
ignore-malformed-range-headers
Closed

Ignore malformed static byte ranges.#100
samuel-williams-shopify wants to merge 1 commit into
mainfrom
ignore-malformed-range-headers

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Summary

  • Ignore malformed Range headers while serving static files.
  • Resolve ranges before conditional header access and pass the result into LocalFile#serve.
  • Treat unsupported multiple ranges as an intentional full-file response rather than an outstanding TODO.

Verification

  • bundle exec sus test/utopia/static.rb
  • bundle exec rubocop lib/utopia/static/middleware.rb lib/utopia/static/local_file.rb test/utopia/static.rb
  • bundle exec bake decode:index:coverage lib
  • git diff --check

The full local suite reached 488 passing tests, but four generated-project tests failed during Bundler setup because the shared vendor/bundle contains native extensions built for a different Ruby. The focused tests and branch-related checks pass.

Assisted-By: devx/cbdeae41-9308-4071-ad53-58cd92db2946
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