few quick changes

This commit is contained in:
Miroslav Stampar 2010-06-10 11:34:17 +00:00
parent 887adfcf10
commit 36953221f8
2 changed files with 5 additions and 4 deletions

View File

@ -105,6 +105,6 @@ def decodePage(page, contentEncoding, contentType):
#http://stackoverflow.com/questions/1020892/python-urllib2-read-to-unicode
if contentType and (contentType.find('charset=') != -1):
page = unicode(page, contentType.split('charset=')[-1])
page = unicode(page, contentType.split('charset=')[-1]) #don't use getUnicode here. it needs to stay as is.
return page

View File

@ -32,6 +32,7 @@ import traceback
from lib.contrib import multipartpost
from lib.core.common import readInput
from lib.core.common import getUnicode
from lib.core.convert import urlencode
from lib.core.data import conf
from lib.core.data import kb
@ -163,7 +164,7 @@ class Connect:
if not cookieStr:
cookieStr = "Cookie: "
cookie = unicode(cookie)
cookie = getUnicode(cookie)
index = cookie.index(" for ")
cookieStr += "%s; " % cookie[8:index]
@ -256,7 +257,7 @@ class Connect:
responseMsg += "(%s - %d):\n" % (status, code)
if conf.verbose <= 4:
responseMsg += unicode(responseHeaders)
responseMsg += getUnicode(responseHeaders)
elif conf.verbose > 4:
responseMsg += "%s\n%s\n" % (responseHeaders, page)