summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
AgeCommit message (Collapse)Author
2016-11-11Make MailHeaderMap perform case-insensitive searchesBruce Guenter
The trait MailHeaderMap has two methods for searching headers, normal and case-insensitive. This documentation says: > According to the spec the mail headers are supposed to be > case-sensitive, but in real-world scenarios that's not always the > case. Actually, the spec says nothing that headers supposed to case-sensitive, and historical precedent is to be case-insensitive. Certainly, all the mail processing software I am familiar with (Thunderbird, qmail, ezmlm, and mutt) treat headers as case insensitive. RFC 822 section 3.4.7 says: > When matching any other syntactic unit, case is to be ignored. For > example, the field-names "From", "FROM", "from", and even "FroM" are > semantically equal and should all be treated identically. While RFC 2822 did drop that section (and RFC 5322 didn't restore it), others interpret other parts to indicate case insensitivity. https://stackoverflow.com/a/6143644 > RFC 5322 does actually specify this, but it is very indirect. https://www.gnu.org/software/emacs/manual/html_node/emacs/Mail-Headers.html > Upper and lower case are equivalent in field names. https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.email.ExtractEmailHeaders/index.html > NOTE the header key is case insensitive This change makes all header searches case insensitive.
2016-10-02rustfmtKartikaya Gupta
2016-10-02Update main examples to include a dateparse usageKartikaya Gupta
2016-10-02Expose the dateparse module from mailparseKartikaya Gupta
2016-06-22Add case-insensitive accessors for headersKartikaya Gupta
2016-06-22Handle case where an encoded-word has trailing whitespace inside the encodingKartikaya Gupta
2016-06-22Recognize encoded words in more placesKartikaya Gupta
2016-06-22Accept lowercase transfer-codings for the encoded-wordKartikaya Gupta
2016-06-22Allow quoted-printable header words to be wrapped in quotesKartikaya Gupta
2016-06-18rustfmtKartikaya Gupta
2016-06-18Make formatting a little prettier using concatKartikaya Gupta
2016-06-18Add rustdoc to the source codeKartikaya Gupta
2016-06-18Drop position property from generic errorKartikaya Gupta
2016-06-18Make decode_word return an Option instead of an ignored ErrorKartikaya Gupta
2016-06-18Default unknown body charsets to ASCIIKartikaya Gupta
2016-06-18Strip out whitespace before base64-decoding the mail bodyKartikaya Gupta
2016-06-18Make the MailParseErrors hold a static string mostlyKartikaya Gupta
2016-06-15Use the stringify macro to print out the mattern in assert_matchKartikaya Gupta
2016-06-12Handle content-transfer-encoding in mail bodiesKartikaya Gupta
2016-06-12Bump quoted-printable dependency to 0.3Kartikaya Gupta
2016-06-11Add a parse_mail function to build the subpart tree for multipart mailsKartikaya Gupta
2016-06-11Update header-parsing to skip past empty newline at the end of the headers, ↵Kartikaya Gupta
and also to allow CRLF instead of just LF
2016-06-11Add some code to extract content-type header components that we need for ↵Kartikaya Gupta
parsing the body
2016-06-11Add a test from a real mailfile with non-ASCII characters in header fieldsKartikaya Gupta
2016-06-10Add a helper find_from_u8 functionKartikaya Gupta
2016-06-08Remove unused importKartikaya Gupta
2016-06-08rustfmtKartikaya Gupta
2016-06-08When converting header keys and values from bytes to Strings, assume ↵Kartikaya Gupta
ISO-8859-1 instead of UTF-8
2016-06-08Add a simple assert_match macro for help with testingKartikaya Gupta
2016-06-08Start cleaning up the MailParseError to be more strongly typedKartikaya Gupta
2016-06-08Allow tab characters in header value overhangsKartikaya Gupta
2016-06-07Convert mailparse to take [u8] instead of &str as the raw inputKartikaya Gupta
2016-06-06Add some mapping functions to more easily extract mail headersKartikaya Gupta
2016-06-01Add more testsKartikaya Gupta
2016-06-01rustfmtKartikaya Gupta
2016-06-01Some more test assertionsKartikaya Gupta
2016-05-30Add support for decoding encoded-word pieces of header values.Kartikaya Gupta
2016-05-28Return the body start offset from parse_headersKartikaya Gupta
2016-05-28rustfmtKartikaya Gupta
2016-05-28Make code a bit more compactKartikaya Gupta
2016-05-28Add a function to parse multiple headersKartikaya Gupta
2016-05-28rustfmtKartikaya Gupta
2016-05-28Add some tests for failure conditions, update parse_header to return the ↵Kartikaya Gupta
offset of the next header
2016-05-27Make the header parsing code more hideous but more correctKartikaya Gupta
2016-05-27rustfmtKartikaya Gupta
2016-05-27Super basic header parserKartikaya Gupta
2016-05-27Initial commit of library stubKartikaya Gupta