mime test

This commit is contained in:
Roy Olav Purser 2021-05-14 16:09:06 +02:00
parent 481167c7e1
commit 677648ecdd
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -315,7 +315,8 @@ class MainHandler(tornado.web.RequestHandler):
self.set_status(404)
self.write("Stream not found. (invalid upstream)")
else:
ctype = await handler.proxy.content_type(upstream)
upstream_proxy = await handler.proxy.proxy_url(upstream, None)
ctype = await handler.proxy.content_type(upstream_proxy)
logger.info(ctype)
logger.info(upstream)
data = None
@ -326,8 +327,7 @@ class MainHandler(tornado.web.RequestHandler):
else:
self.set_header("Content-Type", ctype)
if redir:
upstream = await handler.proxy.proxy_url(upstream, None)
self.redirect(upstream, status=303)
self.redirect(upstream_proxy, status=303)
async def get(self):
await self.handle_any(True)
async def head(self):