Fix content_type handling ingress (#22864)

This commit is contained in:
Pascal Vizeli 2019-04-08 09:22:55 +02:00 committed by GitHub
parent 4982c0b196
commit 2d287d2abe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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