From a793c1d11a3ada1508f0c0979eb317afe2b94ee4 Mon Sep 17 00:00:00 2001 From: Timur Date: Tue, 1 Jul 2014 22:20:18 +0400 Subject: Query string arg names starting with equal sign I use %3D (URL encoded equal sign) prefix in argument name for filter parametrization: GET /users?%3Dphone_number=1234567 Since request_param supports matching specific values with equal sign syntax, this doesn't work when route registered with explicit filter args names in request_param. --- pyramid/config/predicates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyramid/config/predicates.py b/pyramid/config/predicates.py index 967f2eeee..128c3ab7b 100644 --- a/pyramid/config/predicates.py +++ b/pyramid/config/predicates.py @@ -70,7 +70,7 @@ class RequestParamPredicate(object): for p in val: k = p v = None - if '=' in p: + if '=' in p and not (p.startswith('=') or p.endswith('=')): k, v = p.split('=', 1) k, v = k.strip(), v.strip() reqs.append((k, v)) -- cgit v1.2.3