Fixes suffix range requests to truncate ranges.

This commit is contained in:
MurphyMarkW 2015-06-30 02:04:30 -05:00
parent 10c3a37613
commit b82d0264dc

View File

@ -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, ""