From c64d929c6339226e6c29e3bfba195fbc5610865b Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Fri, 17 Aug 2012 01:02:44 +0200 Subject: fix multipart post encoding --- module/network/HTTPRequest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/network/HTTPRequest.py') diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py index 774c0e64d..290a27a40 100644 --- a/module/network/HTTPRequest.py +++ b/module/network/HTTPRequest.py @@ -167,7 +167,7 @@ class HTTPRequest(): self.c.setopt(pycurl.POSTFIELDS, post) else: - post = [(x, str(quote(y)) if type(y) in (str, unicode) else y ) for x, y in post.iteritems()] + post = [(x, y.encode('utf8') if type(y) == unicode else y ) for x, y in post.iteritems()] self.c.setopt(pycurl.HTTPPOST, post) else: self.c.setopt(pycurl.POST, 0) -- cgit v1.2.3