summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur <timka@users.noreply.github.com>2014-07-01 22:20:18 +0400
committerTimur <timka@users.noreply.github.com>2014-07-01 22:20:18 +0400
commita793c1d11a3ada1508f0c0979eb317afe2b94ee4 (patch)
tree37f72f44b184c604c7c85ab9afae343147f737aa
parenta51554705821c11d26980e731aa6c826c7a2c4ca (diff)
downloadpyramid-a793c1d11a3ada1508f0c0979eb317afe2b94ee4.tar.gz
pyramid-a793c1d11a3ada1508f0c0979eb317afe2b94ee4.tar.bz2
pyramid-a793c1d11a3ada1508f0c0979eb317afe2b94ee4.zip
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.
-rw-r--r--pyramid/config/predicates.py2
1 files changed, 1 insertions, 1 deletions
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))