From c449ca97e31aa9b73d1843620cda6bff376e9f75 Mon Sep 17 00:00:00 2001 From: Tab Bennedum Date: Tue, 25 Nov 2014 14:48:53 -0500 Subject: [PATCH] Added correct Content-Type header to showPoster calls. --- sickbeard/webserve.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index bfc73f49..d8955624 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -234,7 +234,9 @@ class MainHandler(RequestHandler): func = getattr(klass, 'index', None) if callable(func): - return func(**args) + out = func(**args) + self._headers = klass._headers + return out raise HTTPError(404) @@ -279,9 +281,11 @@ class MainHandler(RequestHandler): image_file_name = cache_obj.banner_thumb_path(show) if ek.ek(os.path.isfile, image_file_name): + self.set_header('Content-Type', 'image/jpeg') with file(image_file_name, 'rb') as img: return img.read() + self.set_header('Content-Type', 'image/png') with file(default_image_path, 'rb') as img: return img.read()