[multipart] make sure form keys are not bytes
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 30 Sep 2015 18:05:00 +0200
changeset 10741 6666e52d8dd9
parent 10740 59e89db3a67d
child 10742 8be1204cabdb
[multipart] make sure form keys are not bytes
multipart.py
--- a/multipart.py	Wed Sep 30 18:04:27 2015 +0200
+++ b/multipart.py	Wed Sep 30 18:05:00 2015 +0200
@@ -402,7 +402,7 @@
             data = parse_qs(data, keep_blank_values=True)
             for key, values in data.items():
                 for value in values:
-                    forms[key] = value.decode(charset)
+                    forms[key.decode(charset)] = value.decode(charset)
         else:
             raise MultipartError("Unsupported content type.")
     except MultipartError: