Message344431
| Author | maxking |
|---|---|
| Recipients | Dain Dwarf, Windson Yang, barry, bortzmeyer, cnicodeme, jpic, kal.sze, maxking, msapiro, ned.deily, nicoe, r.david.murray, vstinner, xtreak |
| Date | 2019-06-03.15:44:34 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1559576674.83.0.516404321395.issue34155@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
I agree that we currently abandon parsing (raise `HeaderParseError`) when we encounter a unexpected token when parsing domain (expected token is dot-atom-text). However, that mechanism is meant to signal the higher level parser that we should look for a different type of token. In case of domain, we don't fallback to anything. I believe we should fallback to `get_unstructured` when we do encounter an invalid domain (either `foo.` or `foo@exaomple` or `foo@example.com`) and register defect. But, the `.domain` attribute on the address class should be None if the domain is invalid. My proposed solution of `get_unstrucutured` is perhaps not a great idea either since we would end up parsing more than we should (maybe we should parse until `>`?) in case of AddrList or something. I would love to know what David and Barry think about this one? |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-06-03 15:44:34 | maxking | set | recipients: + maxking, barry, vstinner, msapiro, ned.deily, r.david.murray, nicoe, kal.sze, Windson Yang, xtreak, cnicodeme, bortzmeyer, jpic, Dain Dwarf |
| 2019-06-03 15:44:34 | maxking | set | messageid: <1559576674.83.0.516404321395.issue34155@roundup.psfhosted.org> |
| 2019-06-03 15:44:34 | maxking | link | issue34155 messages |
| 2019-06-03 15:44:34 | maxking | create | |