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 <>
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 ``) 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?
Date User Action Args
2019-06-03 15:44:34maxkingsetrecipients: + 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:34maxkingsetmessageid: <>
2019-06-03 15:44:34maxkinglinkissue34155 messages
2019-06-03 15:44:34maxkingcreate