From dc8f9b07336144a0e257123f72b29d142cafe726 Mon Sep 17 00:00:00 2001 From: Peter Parente Date: Tue, 3 Mar 2015 22:40:27 -0500 Subject: [PATCH] Ensure Cache-Control is set once and only once Whether browsers should pick the first or last instance of a duped header is ill defined --- IPython/html/base/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/html/base/handlers.py b/IPython/html/base/handlers.py index 7dc625204..1b042062b 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 []