From 4799b7a9b32703b1f85dbb91c4b3578dc748af45 2015-03-04 18:25:15 From: Min RK Date: 2015-03-04 18:25:15 Subject: [PATCH] Merge pull request #7960 from parente/set-no-cache-header Ensure Cache-Control is set once and only once --- diff --git a/IPython/html/base/handlers.py b/IPython/html/base/handlers.py index 7dc6252..1b04206 100644 --- a/IPython/html/base/handlers.py +++ b/IPython/html/base/handlers.py @@ -404,7 +404,7 @@ class FileFindHandler(web.StaticFileHandler): # disable browser caching, rely on 304 replies for savings if "v" not in self.request.arguments or \ any(self.request.path.startswith(path) for path in self.no_cache_paths): - self.add_header("Cache-Control", "no-cache") + self.set_header("Cache-Control", "no-cache") def initialize(self, path, default_filename=None, no_cache_paths=None): self.no_cache_paths = no_cache_paths or []