summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2020-11-11 19:24:29 +0100
committerMarcel Hellkamp <marc@gsites.de>2020-11-11 19:24:29 +0100
commit57a2f22e0c1d2b328c4f54bf75741d74f47f1a6b (patch)
treeb350da508f63804fa189a380aa6f7aab1526b1c4
parent2d6acef676d35611dc58ca9c3bac51789adbcce8 (diff)
downloadbottle-57a2f22e0c1d2b328c4f54bf75741d74f47f1a6b.tar.gz
Do not split query strings on `;` anymore.
Using `;` as a separator instead of `&` was allowed a long time ago, but is now obsolete and actually invalid according to the 2014 W3C recommendations. Even if this change is technically backwards-incompatible, no real-world application should depend on broken behavior. If you REALLY need this functionality, monkey-patch the _parse_qsl() function.
-rw-r--r--bottle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bottle.py b/bottle.py
index bcfc5e6..417b01b 100644
--- a/bottle.py
+++ b/bottle.py
@@ -2585,7 +2585,7 @@ def parse_range_header(header, maxlen=0):
def _parse_qsl(qs):
r = []
- for pair in qs.replace(';','&').split('&'):
+ for pair in qs.split('&'):
if not pair: continue
nv = pair.split('=', 1)
if len(nv) != 2: nv.append('')