diff options
| author | Michael Merickel <michael@merickel.org> | 2016-02-28 14:59:23 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2016-02-28 14:59:23 -0600 |
| commit | 4c1f5ac9aa29616421e75a42157d4c619c9269d6 (patch) | |
| tree | 9dc92634254e36239fdd7fb6b21629092a782210 | |
| parent | 53c7f7c0f93883dcd37facebd550b38ec79034e6 (diff) | |
| download | pyramid-4c1f5ac9aa29616421e75a42157d4c619c9269d6.tar.gz pyramid-4c1f5ac9aa29616421e75a42157d4c619c9269d6.tar.bz2 pyramid-4c1f5ac9aa29616421e75a42157d4c619c9269d6.zip | |
fix #1370 to use split instead of rsplit to keep consistent
| -rw-r--r-- | pyramid/config/predicates.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pyramid/config/predicates.py b/pyramid/config/predicates.py index d87fd1aae..0b76bbd70 100644 --- a/pyramid/config/predicates.py +++ b/pyramid/config/predicates.py @@ -70,11 +70,13 @@ class RequestParamPredicate(object): for p in val: k = p v = None - if '=' in p: - if p.startswith('='): - k, v = p.rsplit('=', 1) - else: - k, v = p.split('=', 1) + if p.startswith('='): + if '=' in p[1:]: + k, v = p[1:].split('=', 1) + k = '=' + k + k, v = k.strip(), v.strip() + elif '=' in p: + k, v = p.split('=', 1) k, v = k.strip(), v.strip() reqs.append((k, v)) self.val = val |
