wsgi/handler.py
changeset 9287 e70c8c70e344
parent 8695 358d8bed9626
child 9289 9bb7b5dc4214
equal deleted inserted replaced
9286:02a491f6fa92 9287:e70c8c70e344
     1 # copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
    95 
    95 
    96 class CubicWebWSGIApplication(object):
    96 class CubicWebWSGIApplication(object):
    97     """This is the wsgi application which will be called by the
    97     """This is the wsgi application which will be called by the
    98     wsgi server with the WSGI ``environ`` and ``start_response``
    98     wsgi server with the WSGI ``environ`` and ``start_response``
    99     parameters.
    99     parameters.
   100 
       
   101     XXX: missing looping tasks and proper repository shutdown when
       
   102     the application is stopped.
       
   103     NOTE: no pyro
       
   104     """
   100     """
   105 
   101 
   106     def __init__(self, config, vreg=None):
   102     def __init__(self, config):
   107         self.appli = CubicWebPublisher(config, vreg=vreg)
   103         self.appli = CubicWebPublisher(config)
   108         self.config = config
   104         self.config = config
   109         self.base_url = self.config['base-url']
   105         self.base_url = self.config['base-url']
   110         self.https_url = self.config['https-url']
       
   111         self.url_rewriter = self.appli.vreg['components'].select_or_none('urlrewriter')
   106         self.url_rewriter = self.appli.vreg['components'].select_or_none('urlrewriter')
   112 
   107 
   113     def _render(self, req):
   108     def _render(self, req):
   114         """this function performs the actual rendering
   109         """this function performs the actual rendering
   115         """
   110         """