diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-12 12:22:20 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-12 12:22:20 +0200 |
commit | 906bb7c1ecc5c34aa93148894eef763f27eba98e (patch) | |
tree | 2f09a639cdd9e414e8f165a667c71a837288d4de /pyload/network/HTTPRequest.py | |
parent | Revert damaged logo.png (diff) | |
download | pyload-906bb7c1ecc5c34aa93148894eef763f27eba98e.tar.xz |
Other import fixes
Diffstat (limited to 'pyload/network/HTTPRequest.py')
-rw-r--r-- | pyload/network/HTTPRequest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pyload/network/HTTPRequest.py b/pyload/network/HTTPRequest.py index a27c59ff2..22a4cc604 100644 --- a/pyload/network/HTTPRequest.py +++ b/pyload/network/HTTPRequest.py @@ -3,12 +3,12 @@ from __future__ import with_statement +import codecs import logging import urllib import pycurl -from codecs import getincrementaldecoder, lookup, BOM_UTF8 from httplib import responses from cStringIO import StringIO @@ -267,10 +267,10 @@ class HTTPRequest(object): try: # self.log.debug("Decoded %s" % encoding ) - if lookup(encoding).name == 'utf-8' and rep.startswith(BOM_UTF8): + if codecs.lookup(encoding).name == 'utf-8' and rep.startswith(codecs.BOM_UTF8): encoding = 'utf-8-sig' - decoder = getincrementaldecoder(encoding)("replace") + decoder = codecs.getincrementaldecoder(encoding)("replace") rep = decoder.decode(rep, True) # TODO: html_unescape as default |