diff --git a/flanker/mime/message/headers/parsing.py b/flanker/mime/message/headers/parsing.py index 71f4ec59..5181c0e3 100644 --- a/flanker/mime/message/headers/parsing.py +++ b/flanker/mime/message/headers/parsing.py @@ -6,7 +6,7 @@ from flanker.mime.message.errors import DecodingError from flanker.utils import to_unicode, is_pure_ascii -MAX_LINE_LENGTH = 10000 +MAX_LINE_LENGTH = 20000 def normalize(header): diff --git a/flanker/utils.py b/flanker/utils.py index 25443631..dc52c297 100644 --- a/flanker/utils.py +++ b/flanker/utils.py @@ -53,9 +53,8 @@ def _make_unicode(value, charset=None): try: value = value.decode(charset, "strict") except UnicodeError as e: - print e.reason if e.reason == "unexpected end of data": - raise errors.DecodingDataCorruptionError() + raise errors.DecodingDataCorruptionError(e.reason) value = _guess_and_convert(value) except LookupError as e: