Add keep-alive on /stream (#27)
This commit is contained in:
parent
e121930e6a
commit
69ada4948b
@ -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))
|
||||||
|
Reference in New Issue
Block a user