From 69ada4948b3b53f52bca22a8ebea81e83fdd2900 Mon Sep 17 00:00:00 2001 From: pluja Date: Tue, 8 Sep 2020 10:13:27 +0200 Subject: [PATCH] Add keep-alive on /stream (#27) --- app/routes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index a7780a2..06ad6ef 100644 --- a/app/routes.py +++ b/app/routes.py @@ -344,7 +344,9 @@ def stream(url): url = url.replace('YotterSlash', '/') headers = Headers() 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('Accept-Ranges','bytes') headers.add('Content-Length', str(int(req.headers['Content-Length'])+1))