Ejemplo n.º 1
0
    def finish_request(self, req, resp):
        """Called by the middleware at the end of the request.

        This gives the log an opportunity to add information to the
        page.
        """
        if 'deliv_log' in req.GET and display_logging(req):
            resp.body += self.format_html_log()
            resp.cache_expires()
        return resp
Ejemplo n.º 2
0
    def finish_request(self, req, resp):
        """Called by the middleware at the end of the request.

        This gives the log an opportunity to add information to the
        page.
        """
        if 'deliv_log' in req.GET and display_logging(req):
            resp.body += self.format_html_log()
            resp.cache_expires()
        return resp
Ejemplo n.º 3
0
 def internal_app(self, req, resource_fetcher):
     """
     Handles all internal (``/.deliverance``) requests.
     """
     segment = req.path_info_peek()
     method = 'action_%s' % segment
     method = getattr(self, method, None)
     if not display_logging(req) and not getattr(method, 'exposed', False):
         return exc.HTTPForbidden("Logging is not enabled for you")
     req.path_info_pop()
     if not method:
         return exc.HTTPNotFound('There is no %r action' % segment)
     try:
         return method(req, resource_fetcher)
     except exc.HTTPException, e:
         return e
Ejemplo n.º 4
0
 def internal_app(self, req, resource_fetcher):
     """
     Handles all internal (``/.deliverance``) requests.
     """
     segment = req.path_info_peek()
     method = "action_%s" % segment
     method = getattr(self, method, None)
     if not display_logging(req) and not getattr(method, "exposed", False):
         return exc.HTTPForbidden("Logging is not enabled for you")
     req.path_info_pop()
     if not method:
         return exc.HTTPNotFound("There is no %r action" % segment)
     try:
         return method(req, resource_fetcher)
     except exc.HTTPException, e:
         return e