msg294875 - (view) |
Author: Chris Bradley (chris@arrai.com) |
Date: 2017-05-31 22:08 |
When email.policy.SMTP.fold() attempts to wrap a line in which a chunk that does not contain a space is longer than the maximum line length, two things go wrong: - The second line does not begin with a space, creating an invalid header. - The space before the long chunk is stripped, causing the line break to occur in an invalid place. In the attached test case, email.policy.SMTP.fold() is called on a line of the style: Content-Disposition: attachment; filename="" does not contain any spaces and increases in length with each pass. Everything works correctly when 'filename=""' fits onto one line. However, once it is longer than the maximum line length, the following happens: - the space after the semicolon is dropped - the line break often splits up the 'filename' keyword - the second line loses the initial whitespace |
|
|
msg294878 - (view) |
Author: Joel Hillacre (jhillacre) * |
Date: 2017-05-31 22:54 |
I added a pull request that causes Chris's test to pass. I can confirm that the Chris's was not pass for me on master branch. |
|
|
msg295209 - (view) |
Author: Joel Hillacre (jhillacre) * |
Date: 2017-06-05 20:14 |
Rebased the github PR on latest master to get the windows build passing CI. Is there anything I need to do to keep the PR moving? |
|
|
msg295210 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2017-06-05 20:31 |
Ping the issue again next week if I don't get to it this weekend. |
|
|
msg296584 - (view) |
Author: Joel Hillacre (jhillacre) * |
Date: 2017-06-21 21:06 |
> Ping the issue again next week if I don't get to it this weekend. I am a week late, but here is a ping. |
|
|
msg296732 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2017-06-23 18:09 |
Just as well. I had no time last weekend. I should have time this Sunday, though. |
|
|
msg296948 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2017-06-26 21:41 |
New changeset b350c22ebcbb891412e0b334afc9f0db19534e06 by R. David Murray (Joel Hillacre) in branch 'master': bpo-30532: Fix whitespace folding in certain cases https://github.com/python/cpython/commit/b350c22ebcbb891412e0b334afc9f0db19534e06 |
|
|
msg297843 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2017-07-06 21:28 |
New changeset c60d2f5e8609b040ab58c498fde23928fe9dbef5 by R. David Murray (Joel Hillacre) in branch '3.6': bpo-30532: Fix whitespace folding in certain cases (#2591) https://github.com/python/cpython/commit/c60d2f5e8609b040ab58c498fde23928fe9dbef5 |
|
|
msg297844 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2017-07-06 21:29 |
New changeset 3bbdf990a2c1b0b303b950058e3177a1bd5f697a by R. David Murray (Joel Hillacre) in branch '3.5': bpo-30532: Fix whitespace folding in certain cases (#2592) https://github.com/python/cpython/commit/3bbdf990a2c1b0b303b950058e3177a1bd5f697a |
|
|
msg297845 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2017-07-06 21:30 |
Thanks, Joel! |
|
|