end is size-1
This commit is contained in:
parent
56477d2757
commit
66989a78e5
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ def serve_static(handler, path, mimetype, include_body=True, disposition=None):
|
|||
handler.set_status(206)
|
||||
r = handler.request.headers.get('Range').split('=')[-1].split('-')
|
||||
start = int(r[0])
|
||||
end = int(r[1]) if r[1] else size
|
||||
end = int(r[1]) if r[1] else (size - 1)
|
||||
length = end - start + 1
|
||||
handler.set_header('Content-Length', str(length))
|
||||
handler.set_header('Content-Range', 'bytes %s-%s/%s' % (start, end, size))
|
||||
|
|
Loading…
Reference in a new issue