web/application.py
changeset 8997 525915f8bc1c
parent 8753 b61a7c6352f2
child 9017 aa709bc6b6c1
child 9175 a7412e884d7b
equal deleted inserted replaced
8996:dcd8aa47adce 8997:525915f8bc1c
   271     info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
   271     info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
   272 
   272 
   273 class CubicWebPublisher(object):
   273 class CubicWebPublisher(object):
   274     """the publisher is a singleton hold by the web frontend, and is responsible
   274     """the publisher is a singleton hold by the web frontend, and is responsible
   275     to publish HTTP request.
   275     to publish HTTP request.
       
   276 
       
   277     The http server will call its main entry point ``application.handle_request``.
       
   278 
       
   279     .. automethod:: cubicweb.web.application.CubicWebPublisher.main_handle_request
   276     """
   280     """
   277 
   281 
   278     def __init__(self, config,
   282     def __init__(self, config,
   279                  session_handler_fact=CookieSessionHandler,
   283                  session_handler_fact=CookieSessionHandler,
   280                  vreg=None):
   284                  vreg=None):
   337                         self.exception('error while logging queries')
   341                         self.exception('error while logging queries')
   338 
   342 
   339 
   343 
   340 
   344 
   341     def main_handle_request(self, req, path):
   345     def main_handle_request(self, req, path):
       
   346         """Process and http request
       
   347 
       
   348         Arguments are:
       
   349         - a Request object
       
   350         - path of the request object
       
   351 
       
   352         It return the content of the http response. HTTP header and status are
       
   353         are set on the Request Object.
       
   354         """
   342         if not isinstance(req, CubicWebRequestBase):
   355         if not isinstance(req, CubicWebRequestBase):
   343             warn('[3.15] Application entry poin arguments are now (req, path) '
   356             warn('[3.15] Application entry poin arguments are now (req, path) '
   344                  'not (path, req)', DeprecationWarning, 2)
   357                  'not (path, req)', DeprecationWarning, 2)
   345             req, path = path, req
   358             req, path = path, req
   346         if req.authmode == 'http':
   359         if req.authmode == 'http':