aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/email/_header_value_parser.py
Commit message (Collapse)AuthorAge
* #20977: fix undefined name in the email module. Patch by Rose Ames.Ezio Melotti2014-08-04
|
* Issue #20976: pyflakes: Remove unused importsVictor Stinner2014-03-20
|
* Merge: #16983: Apply postel's law to encoded words inside quoted strings.R David Murray2014-02-08
|\
| * #16983: Apply postel's law to encoded words inside quoted strings.R David Murray2014-02-08
| | | | | | | | | | | | | | | | | | | | This applies only to the new parser. The old parser decodes encoded words inside quoted strings already, although it gets the whitespace wrong when it does so. This version of the patch only handles the most common case (a single encoded word surrounded by quotes), but I haven't seen any other variations of this in the wild yet, so its good enough for now.
* | Merge: #18431: Decode encoded words in atoms in new email parser.R David Murray2013-07-12
|\|
| * #18431: Decode encoded words in atoms in new email parser.R David Murray2013-07-12
| | | | | | | | | | | | There is more to be done here in terms of accepting RFC invalid input that some mailers accept, but this covers the valid RFC places where encoded words can occur in structured headers.
* | Merge: #18044: Fix parsing of encoded words of the form =?utf8?q?=XX...?=R David Murray2013-07-11
|\|
| * #18044: Fix parsing of encoded words of the form =?utf8?q?=XX...?=R David Murray2013-07-11
| | | | | | | | | | | | | | | | | | | | The problem was I was only checking for decimal digits after the third '?', not for *hex* digits :(. This changeset also fixes a couple of comment typos, deletes an unused function relating to encoded word parsing, and removed an invalid 'if' test from the folding function that was revealed by the tests written to validate this issue.
* | Issue #17516: use comment syntax for comments, instead of multiline stringVictor Stinner2013-03-26
| |
* | Merge with 3.3, issue #17047: remove doubled words added in 3.3,Terry Jan Reedy2013-03-11
|\| | | | | | | as reported by Serhiy Storchaka and Matthew Barnett.
| * Issue #17047: remove doubled words added in 3.3Terry Jan Reedy2013-03-11
| | | | | | | | as reported by Serhiy Storchaka and Matthew Barnett.
* | utilize yield fromPhilip Jenvey2012-10-01
|/
* #15160: Extend the new email parser to handle MIME headers.R David Murray2012-06-24
| | | | | | | | | | | | | | | | | | | | | | | This code passes all the same tests that the existing RFC mime header parser passes, plus a bunch of additional ones. There are a couple of commented out tests where there are issues with the folding. The folding doesn't normally get invoked for headers parsed from source, and the cases are marginal anyway (headers with invalid binary data) so I'm not worried about them, but will fix them after the beta. There are things that can be done to make this API even more convenient, but I think this is a solid foundation worth having. And the parser is a full RFC parser, so it handles cases that the current parser doesn't. (There are also probably cases where it fails when the current parser doesn't, but I haven't found them yet ;) Oh, yeah, and there are some really ugly bits in the parser for handling some 'postel' cases that are unfortunately common. I hope/plan to to eventually refactor a lot of the code in the parser which should reduce the line count...but there is no escaping the fact that the error recovery is welter of special cases.
* Recognize '<>' as a special case of an angle-addr in header_value_parser.R David Murray2012-05-26
| | | | | | | Although '<>' is invalid according to RFC 5322, SMTP uses it for various things, and it sometimes ends up in email headers. This patch changes get_angle_addr to recognize it and just register a Defect instead of raising a parsing error.
* #12586: add provisional email policy with new header parsing and folding.R David Murray2012-05-25
When the new policies are used (and only when the new policies are explicitly used) headers turn into objects that have attributes based on their parsed values, and can be set using objects that encapsulate the values, as well as set directly from unicode strings. The folding algorithm then takes care of encoding unicode where needed, and folding according to the highest level syntactic objects. With this patch only date and time headers are parsed as anything other than unstructured, but that is all the helper methods in the existing API handle. I do plan to add more parsers, and complete the set specified in the RFC before the package becomes stable.