This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author drlazor8
Recipients Abridbus, barry, drlazor8, r.david.murray
Date 2021-07-15.13:15:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626354928.25.0.0501595431544.issue44637@roundup.psfhosted.org>
In-reply-to
Content
Hello David,

I'm working in the same company as Baptiste and I'm trying to solve the problem. The issue is indeed related to the folding algorithm, the DBQUOTE character is lost in the parse_tree AST thus when the folding algo split the children to find a sweat spot to split the line it doesn't re-introduce the DBQUOTE and instead inject the content of the BareQuotedString right away.

I'm working on a fix which consist of adding two DBQUOTE, one at the beginning and one at the end, of the BareQuotedString token when it is created (_header_value_parser.py@get_bare_quoted_string()). I was inspired by how the angles < and > are injected around the AddrSpec token in a AngleAddr token.

Right now my fix isn't correct, there are some unittest falling. I'm trying to get it working and hopefully get back to you with a nice pull-request :)

Regards,
Julien
History
Date User Action Args
2021-07-15 13:15:28drlazor8setrecipients: + drlazor8, barry, r.david.murray, Abridbus
2021-07-15 13:15:28drlazor8setmessageid: <1626354928.25.0.0501595431544.issue44637@roundup.psfhosted.org>
2021-07-15 13:15:28drlazor8linkissue44637 messages
2021-07-15 13:15:27drlazor8create