Add keep-alive on /stream (#27)

This commit is contained in:
pluja 2020-09-08 10:13:27 +02:00
parent e121930e6a
commit 69ada4948b

View File

@ -344,7 +344,9 @@ def stream(url):
url = url.replace('YotterSlash', '/') url = url.replace('YotterSlash', '/')
headers = Headers() headers = Headers()
if(url): if(url):
req = requests.get(url, stream = True) s = requests.Session()
s.verify = True
req = s.get(url, stream = True)
headers.add('Range', request.headers['Range']) headers.add('Range', request.headers['Range'])
headers.add('Accept-Ranges','bytes') headers.add('Accept-Ranges','bytes')
headers.add('Content-Length', str(int(req.headers['Content-Length'])+1)) headers.add('Content-Length', str(int(req.headers['Content-Length'])+1))