comparison 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
comparison
equal deleted inserted replaced
1197:b251c8bb6776 1198:1211dbc3cca7
1136 1136
1137 @param request(server.Request): HTTP request 1137 @param request(server.Request): HTTP request
1138 @param core(int): error code to use 1138 @param core(int): error code to use
1139 @param no_body: don't write body if True 1139 @param no_body: don't write body if True
1140 """ 1140 """
1141 if self._do_cache is not None:
1142 # we don't want to cache error pages
1143 self._do_cache = None
1141 request.setResponseCode(code) 1144 request.setResponseCode(code)
1142 if no_body: 1145 if no_body:
1143 request.finish() 1146 request.finish()
1144 else: 1147 else:
1145 template = u"error/" + unicode(code) + ".html" 1148 template = u"error/" + unicode(code) + ".html"