Show More
@@ -312,6 +312,12 b' class AuthenticatedFileHandler(IPythonHandler, web.StaticFileHandler):' | |||||
312 |
|
312 | |||
313 | return web.StaticFileHandler.get(self, path) |
|
313 | return web.StaticFileHandler.get(self, path) | |
314 |
|
314 | |||
|
315 | def set_headers(self): | |||
|
316 | super(AuthenticatedFileHandler, self).set_headers() | |||
|
317 | # disable browser caching, rely in 304 replies for savings | |||
|
318 | if "v" not in self.request.arguments: | |||
|
319 | self.add_header("Cache-Control", "no-cache") | |||
|
320 | ||||
315 | def compute_etag(self): |
|
321 | def compute_etag(self): | |
316 | return None |
|
322 | return None | |
317 |
|
323 | |||
@@ -380,6 +386,12 b' class FileFindHandler(web.StaticFileHandler):' | |||||
380 | # cache search results, don't search for files more than once |
|
386 | # cache search results, don't search for files more than once | |
381 | _static_paths = {} |
|
387 | _static_paths = {} | |
382 |
|
388 | |||
|
389 | def set_headers(self): | |||
|
390 | super(FileFindHandler, self).set_headers() | |||
|
391 | # disable browser caching, rely in 304 replies for savings | |||
|
392 | if "v" not in self.request.arguments: | |||
|
393 | self.add_header("Cache-Control", "no-cache") | |||
|
394 | ||||
383 | def initialize(self, path, default_filename=None): |
|
395 | def initialize(self, path, default_filename=None): | |
384 | if isinstance(path, string_types): |
|
396 | if isinstance(path, string_types): | |
385 | path = [path] |
|
397 | path = [path] |
General Comments 0
You need to be logged in to leave comments.
Login now