From b299912de41c88a4717234564a42587abaf5dd48 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 29 Apr 2011 16:56:02 +0000 Subject: [PATCH] fix for a bug reported by ahmed@isecur1ty.org (UnicodeDecodeError: 'ascii' codec can't decode byte 0x84 in position 396: ordinal not in range(128)) for multipartpost --- lib/request/connect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request/connect.py b/lib/request/connect.py index fd79b854e..9e4ab5fde 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -127,7 +127,7 @@ class Connect: from lib.core.option import proxyHandler multipartOpener = urllib2.build_opener(proxyHandler, multipartpost.MultipartPostHandler) - conn = multipartOpener.open(url, multipart) + conn = multipartOpener.open(unicodeencode(url), multipart) page = conn.read() responseHeaders = conn.info() responseHeaders[URI_HTTP_HEADER] = conn.geturl()