wsgi/handler.py
changeset 9443 6ff9401c37c1
parent 9402 2c48c091b6a2
child 10606 718e78ef6699
equal deleted inserted replaced
9442:fbf2287fb2ce 9443:6ff9401c37c1
    19 
    19 
    20 __docformat__ = "restructuredtext en"
    20 __docformat__ = "restructuredtext en"
    21 
    21 
    22 from itertools import chain, repeat, izip
    22 from itertools import chain, repeat, izip
    23 
    23 
    24 from cubicweb import cwreg, AuthenticationError
    24 from cubicweb import AuthenticationError
    25 from cubicweb.web import DirectResponse
    25 from cubicweb.web import DirectResponse
    26 from cubicweb.web.application import CubicWebPublisher
    26 from cubicweb.web.application import CubicWebPublisher
    27 from cubicweb.wsgi.request import CubicWebWsgiRequest
    27 from cubicweb.wsgi.request import CubicWebWsgiRequest
    28 
    28 
    29 # See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
    29 # See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
    94     """This is the wsgi application which will be called by the
    94     """This is the wsgi application which will be called by the
    95     wsgi server with the WSGI ``environ`` and ``start_response``
    95     wsgi server with the WSGI ``environ`` and ``start_response``
    96     parameters.
    96     parameters.
    97     """
    97     """
    98 
    98 
    99     def __init__(self, repo, config):
    99     def __init__(self, config):
   100         self.appli = CubicWebPublisher(repo, config)
   100         self.appli = CubicWebPublisher(config.repository(), config)
   101         self.config = config
   101         self.config = config
   102         self.base_url = self.config['base-url']
   102         self.base_url = self.config['base-url']
   103         self.url_rewriter = self.appli.vreg['components'].select_or_none('urlrewriter')
   103         self.url_rewriter = self.appli.vreg['components'].select_or_none('urlrewriter')
   104 
   104 
   105     def _render(self, req):
   105     def _render(self, req):