diff mercurial/wireprotoserver.py @ 35900:72de5c504833

py3: factor out helpers to apply string conversion recursively
author Yuya Nishihara <yuya@tcha.org>
date Sat, 27 Jan 2018 13:33:31 +0900
parents 29759c46aa1a
children 48a3a9283f09
line wrap: on
line diff
--- a/mercurial/wireprotoserver.py	Sat Jan 27 13:14:06 2018 +0900
+++ b/mercurial/wireprotoserver.py	Sat Jan 27 13:33:31 2018 +0900
@@ -123,10 +123,7 @@
         return [data[k] for k in keys]
 
     def _args(self):
-        args = self._req.form.copy()
-        if pycompat.ispy3:
-            args = {k.encode('ascii'): [v.encode('ascii') for v in vs]
-                    for k, vs in args.items()}
+        args = util.rapply(pycompat.bytesurl, self._req.form.copy())
         postlen = int(self._req.env.get(r'HTTP_X_HGARGS_POST', 0))
         if postlen:
             args.update(cgi.parse_qs(