rewrite debug print

This commit is contained in:
Roy Olav Purser 2021-05-14 17:02:56 +02:00
parent 305c622c76
commit 658e49e466
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -347,8 +347,10 @@ class MainHandler(tornado.web.RequestHandler):
data = None
if "mpegurl" in ctype.lower():
data = await rewrite(upstream, proxy)
self.set_header("Content-Type", "application/vnd.apple.mpegurl")
self.write(data)
logger.info(data)
if isinstance(data, str):
self.set_header("Content-Type", "application/vnd.apple.mpegurl")
self.write(data)
else:
self.set_header("Content-Type", ctype)
if redir: