[testlib] __errorurl may be a relative path, check we're actually removing base url first
--- a/devtools/testlib.py Fri Mar 26 13:20:42 2010 +0100
+++ b/devtools/testlib.py Fri Mar 26 13:21:25 2010 +0100
@@ -499,7 +499,8 @@
else:
cleanup = lambda p: (p[0], unquote(p[1]))
params = dict(cleanup(p.split('=', 1)) for p in params.split('&') if p)
- path = path[len(req.base_url()):]
+ if path.startswith(req.base_url()): # may be relative
+ path = path[len(req.base_url()):]
return path, params
else:
self.fail('expected a Redirect exception')