From c40ddf18c79e2149c95a0e9e649869ecd6a80071 Mon Sep 17 00:00:00 2001
From: Adam Mills <adam@armills.info>
Date: Wed, 7 Dec 2016 00:03:49 -0500
Subject: [PATCH] Fix incorrect caching of /api/error_log (#4789)

---
 homeassistant/components/http/__init__.py | 4 ++--
 homeassistant/components/http/static.py   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py
index 11a9e755bb4..de864a0c193 100644
--- a/homeassistant/components/http/__init__.py
+++ b/homeassistant/components/http/__init__.py
@@ -32,7 +32,7 @@ from .const import (
     KEY_USE_X_FORWARDED_FOR, KEY_TRUSTED_NETWORKS,
     KEY_BANS_ENABLED, KEY_LOGIN_THRESHOLD,
     KEY_DEVELOPMENT, KEY_AUTHENTICATED)
-from .static import GZIP_FILE_SENDER, staticresource_middleware
+from .static import FILE_SENDER, GZIP_FILE_SENDER, staticresource_middleware
 from .util import get_real_ip
 
 DOMAIN = 'http'
@@ -344,7 +344,7 @@ class HomeAssistantView(object):
     def file(self, request, fil):
         """Return a file."""
         assert isinstance(fil, str), 'only string paths allowed'
-        response = yield from GZIP_FILE_SENDER.send(request, Path(fil))
+        response = yield from FILE_SENDER.send(request, Path(fil))
         return response
 
     def register(self, router):
diff --git a/homeassistant/components/http/static.py b/homeassistant/components/http/static.py
index c8c55870e0f..0bd68d6136e 100644
--- a/homeassistant/components/http/static.py
+++ b/homeassistant/components/http/static.py
@@ -63,6 +63,7 @@ class GzipFileSender(FileSender):
 
 
 GZIP_FILE_SENDER = GzipFileSender()
+FILE_SENDER = FileSender()
 
 
 @asyncio.coroutine
-- 
GitLab