wsgi/handler.py
changeset 9031 6ff29f2879da
parent 9030 c1d5e8ca15ea
child 9402 2c48c091b6a2
equal deleted inserted replaced
9030:c1d5e8ca15ea 9031:6ff29f2879da
    21 
    21 
    22 __docformat__ = "restructuredtext en"
    22 __docformat__ = "restructuredtext en"
    23 
    23 
    24 from itertools import chain, repeat, izip
    24 from itertools import chain, repeat, izip
    25 
    25 
    26 from cubicweb import AuthenticationError
    26 from cubicweb import cwreg, AuthenticationError
    27 from cubicweb.web import DirectResponse
    27 from cubicweb.web import DirectResponse
    28 from cubicweb.web.application import CubicWebPublisher
    28 from cubicweb.web.application import CubicWebPublisher
    29 from cubicweb.wsgi.request import CubicWebWsgiRequest
    29 from cubicweb.wsgi.request import CubicWebWsgiRequest
    30 
    30 
    31 # See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
    31 # See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
   101     XXX: missing looping tasks and proper repository shutdown when
   101     XXX: missing looping tasks and proper repository shutdown when
   102     the application is stopped.
   102     the application is stopped.
   103     NOTE: no pyro
   103     NOTE: no pyro
   104     """
   104     """
   105 
   105 
   106     def __init__(self, config):
   106     def __init__(self, repo, config):
   107         self.appli = CubicWebPublisher(config)
   107         self.appli = CubicWebPublisher(repo, config)
   108         self.config = config
   108         self.config = config
   109         self.base_url = self.config['base-url']
   109         self.base_url = self.config['base-url']
   110         self.https_url = self.config['https-url']
   110         self.https_url = self.config['https-url']
   111         self.url_rewriter = self.appli.vreg['components'].select_or_none('urlrewriter')
   111         self.url_rewriter = self.appli.vreg['components'].select_or_none('urlrewriter')
   112 
   112