--- a/etwist/server.py Mon May 25 22:21:13 2009 +0200
+++ b/etwist/server.py Mon May 25 22:26:05 2009 +0200
@@ -196,7 +196,7 @@
if self.url_rewriter is not None:
# XXX should occur before authentication?
try:
- path = self.url_rewriter.rewrite(host, origpath)
+ path = self.url_rewriter.rewrite(host, origpath, req)
except Redirect, ex:
return self.redirect(req, ex.location)
request.uri.replace(origpath, path, 1)
--- a/web/views/apacherewrite.py Mon May 25 22:21:13 2009 +0200
+++ b/web/views/apacherewrite.py Mon May 25 22:26:05 2009 +0200
@@ -87,7 +87,8 @@
id = 'urlrewriter'
rules = []
- def rewrite(self, host, path):
+ def rewrite(self, host, path, req):
+ self.req = req
for cond in self.rules:
if cond.match(host=host, path=path):
return cond.process(path)