Skip to content

Commit 57a2f22

Browse files
committed
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.
1 parent 2d6acef commit 57a2f22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bottle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2585,7 +2585,7 @@ def parse_range_header(header, maxlen=0):
25852585

25862586
def _parse_qsl(qs):
25872587
r = []
2588-
for pair in qs.replace(';','&').split('&'):
2588+
for pair in qs.split('&'):
25892589
if not pair: continue
25902590
nv = pair.split('=', 1)
25912591
if len(nv) != 2: nv.append('')

0 commit comments

Comments
 (0)