Skip to content

Commit

Permalink
Fix #3. Increase MAX_LINE_LENGTH
Browse files Browse the repository at this point in the history
  • Loading branch information
frankobe committed Jun 7, 2017
1 parent 2b31737 commit 09b414d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flanker/mime/message/headers/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 1 addition & 2 deletions flanker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 09b414d

Please sign in to comment.