##// END OF EJS Templates
fixed error controller __before__ behavior,
marcink -
r311:9a70fe91 default
parent child Browse files
Show More
@@ -21,13 +21,13 b' class ErrorController(BaseController):'
21 This behaviour can be altered by changing the parameters to the
21 This behaviour can be altered by changing the parameters to the
22 ErrorDocuments middleware in your config/middleware.py file.
22 ErrorDocuments middleware in your config/middleware.py file.
23 """
23 """
24 # def __before__(self):
24 def __before__(self):
25 # super(ErrorController, self).__before__()
25 pass#disable all base actions since we don't need them here
26
26
27 def document(self):
27 def document(self):
28 resp = request.environ.get('pylons.original_response')
28 resp = request.environ.get('pylons.original_response')
29
29
30 log.debug(resp.status)
30 log.debug('### %s ###', resp.status)
31
31
32 e = request.environ
32 e = request.environ
33 c.serv_p = r'%(protocol)s://%(host)s/' % {
33 c.serv_p = r'%(protocol)s://%(host)s/' % {
@@ -35,7 +35,6 b' class ErrorController(BaseController):'
35 'host':e.get('HTTP_HOST'),
35 'host':e.get('HTTP_HOST'),
36 }
36 }
37
37
38
39 if resp.status_int == 404:
38 if resp.status_int == 404:
40 org_e = request.environ.get('pylons.original_request').environ
39 org_e = request.environ.get('pylons.original_request').environ
41 c.repo_name = repo_name = org_e['PATH_INFO'].split('/')[1]
40 c.repo_name = repo_name = org_e['PATH_INFO'].split('/')[1]
General Comments 0
You need to be logged in to leave comments. Login now