From 910b657a61da74fa58f9f8c21b112563b151874e Mon Sep 17 00:00:00 2001 From: Paulo Pizarro Date: Fri, 31 Dec 2010 10:00:51 -0200 Subject: [PATCH] Fixed problem with escape caracters on proxy password Signed-off-by: Paulo Pizarro --- papyon/gnet/proxy/proxy_infos.py | 5 +++-- test.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/papyon/gnet/proxy/proxy_infos.py b/papyon/gnet/proxy/proxy_infos.py index 4e6b343..e58a871 100644 --- a/papyon/gnet/proxy/proxy_infos.py +++ b/papyon/gnet/proxy/proxy_infos.py @@ -19,6 +19,7 @@ import base64 import urlparse +import urllib __all__ = ['ProxyInfos'] @@ -54,8 +55,8 @@ class ProxyInfos(object): self.host = host self.port = port self.type = type - self.user = user - self.password = password + self.user = urllib.unquote_plus(user) + self.password = urllib.unquote_plus(password) @staticmethod def from_string(url, default_type='http'): diff --git a/test.py b/test.py index 453f458..43bbdf3 100755 --- a/test.py +++ b/test.py @@ -21,6 +21,7 @@ def get_proxies(): result['https'] = papyon.Proxy(url) for type, url in proxies.items(): if type == 'no': continue + if type == 'ftp': continue if type == 'https' and url.startswith('http://'): url = url.replace('http://', 'https://', 1) result[type] = papyon.Proxy(url) -- 1.7.1