summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/network/HTTPRequest.py6
-rw-r--r--module/plugins/Base.py2
2 files changed, 3 insertions, 5 deletions
diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py
index a0b419763..2f084efb5 100644
--- a/module/network/HTTPRequest.py
+++ b/module/network/HTTPRequest.py
@@ -28,12 +28,12 @@ from cStringIO import StringIO
from module.plugins.Hoster import Abort
def myquote(url):
- return quote(url.encode('utf_8') if isinstance(url, unicode) else url, safe="%/:=&?~#+!$,;'@()*[]")
+ return quote(url.encode('utf8') if isinstance(url, unicode) else url, safe="%/:=&?~#+!$,;'@()*[]")
def myurlencode(data):
data = dict(data)
- return urlencode(dict((x.encode('utf_8') if isinstance(x, unicode) else x, \
- y.encode('utf_8') if isinstance(y, unicode) else y ) for x, y in data.iteritems()))
+ return urlencode(dict((x.encode('utf8') if isinstance(x, unicode) else x, \
+ y.encode('utf8') if isinstance(y, unicode) else y ) for x, y in data.iteritems()))
bad_headers = range(400, 404) + range(405, 418) + range(500, 506)
diff --git a/module/plugins/Base.py b/module/plugins/Base.py
index 53840ee18..48a3707b1 100644
--- a/module/plugins/Base.py
+++ b/module/plugins/Base.py
@@ -167,8 +167,6 @@ class Base(object):
"""
if not hasattr(self, "req"): raise Exception("Plugin type does not have Request attribute.")
- if type(url) == unicode: url = str(url)
-
res = self.req.load(url, get, post, ref, cookies, just_header, decode=decode)
if self.core.debug: