mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
#11492: fix header truncation on folding when there are runs of split chars.
Not a complete fix for this issue.
This commit is contained in:
parent
7da4db118e
commit
e1292a25d8
2 changed files with 14 additions and 3 deletions
|
@ -793,6 +793,16 @@ Subject: the first part of this is short,
|
|||
;
|
||||
this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself;""")
|
||||
|
||||
def test_long_header_with_multiple_sequential_split_chars(self):
|
||||
# Issue 11492
|
||||
|
||||
eq = self.ndiffAssertEqual
|
||||
h = Header('This is a long line that has two whitespaces in a row. '
|
||||
'This used to cause truncation of the header when folded')
|
||||
eq(h.encode(), """\
|
||||
This is a long line that has two whitespaces in a row. This used to cause
|
||||
truncation of the header when folded""")
|
||||
|
||||
def test_no_split_long_header(self):
|
||||
eq = self.ndiffAssertEqual
|
||||
hstr = 'References: ' + 'x' * 80
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue