From 985f0c1c325685bbbe85de1e9cc8f508cbe4bac2 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Wed, 20 Jan 2021 17:33:03 +1300 Subject: [PATCH] Fix ggpht response call order --- index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.py b/index.py index 3c25edf..d2d34f1 100644 --- a/index.py +++ b/index.py @@ -101,8 +101,8 @@ class Second(object): @cherrypy.expose def ggpht(self, *path): with requests.get("https://yt3.ggpht.com/{}".format("/".join(path))) as r: - cherrypy.response.headers["content-type"] = r.headers["content-type"] r.raise_for_status() + cherrypy.response.headers["content-type"] = r.headers["content-type"] return r cherrypy.config.update({"server.socket_port": 3000, "server.socket_host": "0.0.0.0"})