[url rewriting] fix nasty bug in build_rset inner function: the same dictionary is used by all queries, hence triggering potentially important bugs on concurrent requests (this dictionary goes back and forth the repository) oldstable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 16 May 2011 16:24:00 +0200
brancholdstable
changeset 7388 dc319ece0bd6
parent 7348 dce4fa28ae49
child 7389 c2b29631c1a3
child 7676 cc3987eb793c
[url rewriting] fix nasty bug in build_rset inner function: the same dictionary is used by all queries, hence triggering potentially important bugs on concurrent requests (this dictionary goes back and forth the repository)
web/views/urlrewrite.py
--- a/web/views/urlrewrite.py	Tue May 10 07:57:52 2011 +0200
+++ b/web/views/urlrewrite.py	Mon May 16 16:24:00 2011 +0200
@@ -141,7 +141,8 @@
 def build_rset(rql, rgxgroups=None, cachekey=None, setuser=False,
                vid=None, vtitle=None, form={}, **kwargs):
 
-    def do_build_rset(inputurl, uri, req, schema):
+    def do_build_rset(inputurl, uri, req, schema, kwargs=kwargs):
+        kwargs = kwargs.copy()
         if rgxgroups:
             match = inputurl.match(uri)
             for arg, group in rgxgroups: