changeset 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 b251c8bb6776
children b300eaec53b6
files libervia/server/pages.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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()