Fixes suffix range requests to truncate ranges.
This commit is contained in:
parent
10c3a37613
commit
b82d0264dc
1 changed files with 1 additions and 1 deletions
|
|
@ -254,7 +254,7 @@ class ResponseObject(_TemplateEnvironmentMixin):
|
|||
if begin is not None: # byte range
|
||||
end = last if end is None else min(end, last)
|
||||
elif end is not None: # suffix byte range
|
||||
begin = length - end
|
||||
begin = length - min(end, length)
|
||||
end = last
|
||||
else:
|
||||
return 400, headers, ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue