From 04923bbd52aa1a53b16bb925828d8ed3c4c99af0 Mon Sep 17 00:00:00 2001 From: jiaozi Date: Wed, 26 Jul 2017 09:26:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=BF=BD=E7=95=A5Query=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E7=A9=BA=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- urlutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/urlutils.py b/urlutils.py index 397c5af..a31075c 100644 --- a/urlutils.py +++ b/urlutils.py @@ -46,7 +46,7 @@ class UrlparseCommand(ReplaceCommandBase): @staticmethod def _query_parse(val): lines = [] - query = dict(parse_qsl(val)) + query = dict(parse_qsl(val, keep_blank_values=True)) max_key_len = max(map(len, query.keys())) + 3 for k, v in sorted(query.items()): lines.append('{key} : {val}'.format(key=k.rjust(max_key_len, ' '), val=v))