From 5abbea4a9fa664bac4e8bf82e1cc717ff982e536 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 17 Nov 2010 09:57:32 +0000 Subject: [PATCH] fix for a bug reported by nightman (unknown charset 'null') --- lib/request/basic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/request/basic.py b/lib/request/basic.py index c79ae66e3..5f7e12668 100644 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -92,6 +92,8 @@ def checkCharEncoding(encoding): encoding = 'cp%s' % encoding[3:] elif encoding.startswith('windows') and not encoding.startswith('windows-'): encoding = 'windows-%s' % encoding[7:] + elif encoding == 'null': + return None try: codecs.lookup(encoding)