etwist/server.py
changeset 1936 c5af2fbda5b6
parent 1543 dca9817bb337
child 1977 606923dff11b
equal deleted inserted replaced
1935:a54a3b665361 1936:c5af2fbda5b6
   194             # don't allow anonymous on https connection
   194             # don't allow anonymous on https connection
   195             return self.request_auth(req)
   195             return self.request_auth(req)
   196         if self.url_rewriter is not None:
   196         if self.url_rewriter is not None:
   197             # XXX should occur before authentication?
   197             # XXX should occur before authentication?
   198             try:
   198             try:
   199                 path = self.url_rewriter.rewrite(host, origpath)
   199                 path = self.url_rewriter.rewrite(host, origpath, req)
   200             except Redirect, ex:
   200             except Redirect, ex:
   201                 return self.redirect(req, ex.location)
   201                 return self.redirect(req, ex.location)
   202             request.uri.replace(origpath, path, 1)
   202             request.uri.replace(origpath, path, 1)
   203         else:
   203         else:
   204             path = origpath
   204             path = origpath