From 09731ea0da4753992de70d36d3fc87b5756e5271 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Fri, 17 Aug 2012 01:00:41 +0200 Subject: fix multipart post encoding, add workaround for captcha hooks --- 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 d4c33bbff..4747d937f 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