Skip to content

Fix HTTP byte range handling - #72

Merged
blixvip merged 1 commit into
blixvip:mainfrom
matiasad:fix/range-requests
Nov 16, 2026
Merged

blixvip merged 1 commit into
blixvip:mainfrom
matiasad:fix/range-requests

Conversation

@matiasad

Copy link
Copy Markdown
Contributor

What does this change?

Fixes #31.

Fixes HTTP Range request handling in Handler._file():

  • Correctly handles suffix byte ranges (e.g. bytes=-10 returns the last 10 bytes of the file).
  • Returns 416 Range Not Satisfiable when the requested range starts at or beyond the file size.
  • Returns 416 Range Not Satisfiable when the start of the range is greater than its end.
  • Adds three regression tests covering these cases.

How did you test it?

  • python -m unittest discover passes (86 tests).
  • python -m easyedit.doctor reports a clean machine.
  • Made a real edit end to end (not applicable; the rendering pipeline was not changed).
  • UI changes checked in a real browser (not applicable; no UI changes).

Checklist

  • One fix or feature, kept small and focused.
  • Used the easyedit/util.py helpers (run, output, probe, need, die) rather than calling subprocess directly (not applicable; no subprocess calls were added).
  • No new runtime dependency.
  • Nothing committed from jobs/, .cache/, node_modules/, or any footage.
  • README updated if flags, behavior, or setup changed (no flags or setup changes; this is an internal HTTP Range handling fix).

OS tested: Windows.

@blixvip
blixvip merged commit 0f966e2 into blixvip:main Nov 16, 2026
@blixvip

blixvip commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Merged, thank you @matiasad, and congratulations on your first merged PR on blixvip! 🎉 The full suite passes locally (86 tests, with ffmpeg on PATH). I also ran a real server against /assets/icon.svg. bytes=-10 now returns 206 bytes 2206-2215/2216 with the last 10 bytes, and bytes=99999- returns 416 bytes */2216, which matches the table in #31 exactly. Players reading the moov atom from the end of a file will seek properly now. #31 is closed.

If you'd like a next one, #50 (keep slugify from ending a job name in a hyphen, which breaks every job API) is small, and it has an obvious test to add.

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.

Handle suffix and out-of-range Range requests in the web server

2 participants