From 154d947c62df8d5a9ef1a61642dd8103652f0e38 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 7 Mar 2011 10:15:41 +0000 Subject: [PATCH] minor update --- lib/request/basic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/request/basic.py b/lib/request/basic.py index 5d0d0ef4f..a83954f98 100644 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -148,7 +148,8 @@ def decodePage(page, contentEncoding, contentType): charset = checkCharEncoding(charset) kb.pageEncoding = charset or DEFAULT_PAGE_ENCODING - if contentType and any(map(lambda x: x in contentType, ('text/html', 'text/txt'))): + if contentType and any(map(lambda x: x in contentType.lower(), ('text/txt', 'text/raw', 'text/html', 'text/xml'))): + # can't do for all responses because we need to support binary files too page = getUnicode(page, kb.pageEncoding) return page