From 3a79e37cde39d861789b37dcb6451e9765251bc2 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 8 Apr 2019 09:22:55 +0200 Subject: [PATCH] Fix content_type handling ingress (#22864) --- homeassistant/components/hassio/ingress.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/hassio/ingress.py b/homeassistant/components/hassio/ingress.py index 91224c6f54d..4f7c99618c1 100644 --- a/homeassistant/components/hassio/ingress.py +++ b/homeassistant/components/hassio/ingress.py @@ -118,6 +118,7 @@ class HassIOIngress(HomeAssistantView): return web.Response( headers=headers, status=result.status, + content_type=result.content_type, body=body ) @@ -145,8 +146,7 @@ def _init_header( # filter flags for name, value in request.headers.items(): - if name in (hdrs.CONTENT_LENGTH, hdrs.CONTENT_TYPE, - hdrs.CONTENT_ENCODING): + if name in (hdrs.CONTENT_LENGTH, hdrs.CONTENT_ENCODING): continue headers[name] = value