Changeset - b5d330604a9d
[Not reviewed]
default
0 1 0
Mads Kiilerich - 11 years ago 2015-01-29 21:48:31
madski@unity3d.com
error: don't crash on /error/document urls

244c9b103cff was insufficient.

The non-crashing page is however not so relevant ...
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/error.py
Show inline comments
 
@@ -48,25 +48,25 @@ class ErrorController(BaseController):
 
    This behavior can be altered by changing the parameters to the
 
    ErrorDocuments middleware in your config/middleware.py file.
 
    """
 

	
 
    def __before__(self):
 
        #disable all base actions since we don't need them here
 
        pass
 

	
 
    def document(self):
 
        resp = request.environ.get('pylons.original_response')
 
        c.site_name = config.get('title')
 

	
 
        log.debug('### %s ###' % resp and resp.status)
 
        log.debug('### %s ###' % (resp and resp.status or 'no response'))
 

	
 
        e = request.environ
 
        c.serv_p = r'%(protocol)s://%(host)s/' \
 
                                    % {'protocol': e.get('wsgi.url_scheme'),
 
                                       'host': e.get('HTTP_HOST'), }
 

	
 
        c.error_message = resp and cgi.escape(request.GET.get('code', str(resp.status)))
 
        c.error_explanation = resp and self.get_error_explanation(resp.status_int)
 

	
 
        return render('/errors/error_document.html')
 

	
 
    def img(self, id):
0 comments (0 inline, 0 general)