Skip to content

Commit

Permalink
Allow range requests for a single byte (#2851)
Browse files Browse the repository at this point in the history
Co-authored-by: L. Karkkainen <tronic@users.noreply.github.com>
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
  • Loading branch information
3 people authored Nov 28, 2023
1 parent d0f7f40 commit 359bf4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sanic/handlers/content_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(self, request: Request, stats: os.stat_result) -> None:
# this case represents `Content-Range: bytes -5`
self.start = self.total - self.end
self.end = self.total - 1
if self.start >= self.end:
if self.start > self.end:
raise RangeNotSatisfiable(
"Invalid for Content Range parameters", self
)
Expand Down

0 comments on commit 359bf4d

Please sign in to comment.