Decode binary form input.
authorFredrik Tolf <fredrik@dolda2000.com>
Thu, 3 Apr 2014 03:35:05 +0000 (05:35 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Thu, 3 Apr 2014 03:35:05 +0000 (05:35 +0200)
wrw/form.py

index 7184635..adde1d3 100644 (file)
@@ -10,7 +10,7 @@ def formparse(req):
         if req.input.limit > 2 ** 20:
             raise ValueError("x-www-form-urlencoded data is absurdly long")
         rbody = req.input.read()
-        buf.update(urllib.parse.parse_qsl(rbody))
+        buf.update(urllib.parse.parse_qsl(rbody.decode("latin1")))
     return buf
 
 class badmultipart(Exception):