cubicweb/etwist/server.py
changeset 11725 904ee9cd0cf9
parent 11057 0b59724cb3f2
child 11767 432f87a63057
equal deleted inserted replaced
11724:0fe3cf5c06b3 11725:904ee9cd0cf9
   132             https = True
   132             https = True
   133         if self.url_rewriter is not None:
   133         if self.url_rewriter is not None:
   134             # XXX should occur before authentication?
   134             # XXX should occur before authentication?
   135             path = self.url_rewriter.rewrite(host, origpath, request)
   135             path = self.url_rewriter.rewrite(host, origpath, request)
   136             request.uri.replace(origpath, path, 1)
   136             request.uri.replace(origpath, path, 1)
   137         else:
       
   138             path = origpath
       
   139         req = CubicWebTwistedRequestAdapter(request, self.appli.vreg, https)
   137         req = CubicWebTwistedRequestAdapter(request, self.appli.vreg, https)
   140         try:
   138         try:
   141             ### Try to generate the actual request content
   139             ### Try to generate the actual request content
   142             content = self.appli.handle_request(req, path)
   140             content = self.appli.handle_request(req)
   143         except DirectResponse as ex:
   141         except DirectResponse as ex:
   144             return ex.response
   142             return ex.response
   145         # at last: create twisted object
   143         # at last: create twisted object
   146         return HTTPResponse(code    = req.status_out,
   144         return HTTPResponse(code    = req.status_out,
   147                             headers = req.headers_out,
   145                             headers = req.headers_out,