Browse Source

Return 416 if Range doesn't start with bytes=

master
blank X 1 year ago
parent
commit
3a30cf29c1
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
  1. 8
      streamtg.py

8
streamtg.py

@ -110,6 +110,14 @@ async def handler(request):
}
)
status = 206
else:
return web.Response(status=416,
text='Unknown range type',
headers={
'Content-Range': f'bytes */{max_size}',
'Accept-Ranges': 'bytes'
}
)
length = end - offset + 1
headers = {
'Content-Range': f'bytes {offset}-{end}/{max_size}',

Loading…
Cancel
Save