check content type
This commit is contained in:
parent
5d5a087c50
commit
459cfe231d
@ -91,7 +91,6 @@ def upstream_type(current, proxy):
|
||||
return resp.headers.get("Content-Type", "binary/octet-stream")
|
||||
|
||||
def rewrite(current, provider, proxy, ctype):
|
||||
|
||||
resp = requests.get(current, proxies=proxy.req)
|
||||
ndata = None
|
||||
if resp.text is not None:
|
||||
@ -203,7 +202,7 @@ class MainHandler(tornado.web.RequestHandler):
|
||||
else:
|
||||
ctype = upstream_type(upstream, proxy)
|
||||
data = None
|
||||
if "mpgurl" in ctype:
|
||||
if "mpegurl" in ctype.lower():
|
||||
data = rewrite(upstream, provider, proxy)
|
||||
else:
|
||||
ldata = {}
|
||||
|
Loading…
Reference in New Issue
Block a user