summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2020-11-11 19:33:05 +0100
committerMarcel Hellkamp <marc@gsites.de>2020-11-11 19:33:05 +0100
commitf5a9f76586e06a1cb7bbea8b395000fe9fde7f31 (patch)
treea97482912c45a7c28b8265f92a46835014c05b00
parent0131e74145fb17d4ee2d5fbc475fcbf7de3ced4f (diff)
downloadbottle-f5a9f76586e06a1cb7bbea8b395000fe9fde7f31.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. # Conflicts: # bottle.py
-rwxr-xr-xbottle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bottle.py b/bottle.py
index 9982fa5..ecd83c5 100755
--- a/bottle.py
+++ b/bottle.py
@@ -3054,7 +3054,7 @@ def _parse_http_header(h):
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('')