diff libervia/server/pages.py @ 1198:1211dbc3cca7

pages: don't put error pages in cache
author Goffi <goffi@goffi.org>
date Sat, 06 Jul 2019 14:11:10 +0200
parents aee3d8fa679f
children 251eba911d4d
line wrap: on
line diff
--- a/libervia/server/pages.py	Fri Jul 05 16:49:20 2019 +0200
+++ b/libervia/server/pages.py	Sat Jul 06 14:11:10 2019 +0200
@@ -1138,6 +1138,9 @@
         @param core(int): error code to use
         @param no_body: don't write body if True
         """
+        if self._do_cache is not None:
+            # we don't want to cache error pages
+            self._do_cache = None
         request.setResponseCode(code)
         if no_body:
             request.finish()