don't save sessions for 404's
parent
9e116d4b20
commit
6943b60c0a
|
@ -53,7 +53,11 @@ CHERRYPY_CONFIG = os.path.join(install_dir, 'CherryPy.conf')
|
||||||
LOCAL_CONFIG = [os.path.expanduser('~/.autocat3'), '/etc/autocat3.conf']
|
LOCAL_CONFIG = [os.path.expanduser('~/.autocat3'), '/etc/autocat3.conf']
|
||||||
|
|
||||||
def error_page_404(status, message, traceback, version):
|
def error_page_404(status, message, traceback, version):
|
||||||
return ErrorPage(status, message).index()
|
resp = ErrorPage(status, message).index()
|
||||||
|
|
||||||
|
# signal that we needn't save the session
|
||||||
|
cherrypy.session.loaded = False
|
||||||
|
return resp
|
||||||
|
|
||||||
|
|
||||||
class MyRoutesDispatcher(cherrypy.dispatch.RoutesDispatcher):
|
class MyRoutesDispatcher(cherrypy.dispatch.RoutesDispatcher):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- mode: python; indent-tabs-mode: nil; -*- coding: utf-8 -*-
|
# -*- mode: python; indent-tabs-mode: nil; -*- coding: utf-8 -*-
|
||||||
|
import cherrypy
|
||||||
from BaseSearcher import OpenSearch
|
from BaseSearcher import OpenSearch
|
||||||
from Page import Page
|
from Page import Page
|
||||||
import Formatters
|
import Formatters
|
||||||
|
|
Loading…
Reference in New Issue