[New-bugs-announce] [issue23727] rfc2231 line continuations result in an additional newline

Brian Peterson report at bugs.python.org
Fri Mar 20 22:38:06 CET 2015


New submission from Brian Peterson:

Hey, 

So here we go:

When an email header goes over a line break, rfc2231 (https://tools.ietf.org/html/rfc2231) specifies that it get formatted in such a way that the line break is stripped out. This formatting looks like, for example:

> filename*0="my long attachment"
> filename*1="name.txt"

... which should then get interpreted so that is "semantically identical" to:

> filename="my long attachment name.txt"

Here's a link to an example github repo where I see this not occurring: https://github.com/bepetersn/special-repo

More specifically, the behavior I AM seeing is that the formatting is handled just fine, but that a newline character gets added in.

(I originally thought this had to do with the requests library, so that's why my example repo has some stuff related to that in there too, which you can safely ignore.)

Also, if I am off-base, possibly if my input email's formatting is to blame, sorry for the trouble. :-)

Thanks for reading!

----------
components: Windows
messages: 238725
nosy: Brian Peterson, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: rfc2231 line continuations result in an additional newline
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23727>
_______________________________________


More information about the New-bugs-announce mailing list