Roker
|
17dde83974
|
move quoted-printable functions in namespace pEpMIME::qp, and have to rename "quoted pair" parser rul from qp to qpair.
|
3 years ago |
Roker
|
665964a92e
|
move the base64_decoder for BodyLines into bodyparser.cc where it belongs to.
|
3 years ago |
Roker
|
124b3f8df8
|
split template code into .hxx and non-template code into .cc file
|
3 years ago |
Roker
|
d8d4143d20
|
move base64 functions & data structures in their own namespace, so I can split it into .hxx files
|
3 years ago |
Roker
|
9dce7acd98
|
okay, we can iterate over deque<string_view> char-by-char and base64-decode them. But this way it is uuuuuuugly! Need for refactorization!
|
3 years ago |
Roker
|
5f037ceec0
|
boost::fusion is an ugly hack. *sigh* I mentioned it in the comment, though....
|
3 years ago |
Roker
|
e9d0e2027d
|
rename HeaderField into more generic "NameValue" to use it also in MimeType parameter list etc.
|
3 years ago |
Roker
|
ee9214802c
|
adopt parser rule to skip spaces in ContentType parameters
|
3 years ago |
Roker
|
7da6f26946
|
start to parse Content-Type header
|
3 years ago |
Roker
|
384cfa36ce
|
remove writing to std::cerr during parsing
|
3 years ago |
Roker
|
3c851e6312
|
remove writing to std::cerr during parsing
|
3 years ago |
Roker
|
6ce3b568ac
|
add header_value() helper function to get values from HeaderSection deque.
|
3 years ago |
Roker
|
be4376cf99
|
move definition of "sv" into pEpMIME_internal.hh and start to include the body parser
|
3 years ago |
Roker
|
6c1f247449
|
add stub for parse_body(...)
|
3 years ago |
Roker
|
c49638a23c
|
deque -> vector. and compiler is happy again. :-)
|
3 years ago |
Roker
|
e2a3f86213
|
stringlist (better: message-id list) parsing now works, too. *sigh*
|
3 years ago |
Roker
|
36cbc71c2f
|
Yeah. .alias() is the key to break the circular dependency in the boost::spirit::qi::rule<>'s!
|
3 years ago |
Roker
|
24ba9ec53d
|
vchar is bullshit in quoted_string, because space and Non-ASCII is fine between the quotes!
|
3 years ago |
Roker
|
ce331fff28
|
still looking why it does not parse address lists correctly...
|
3 years ago |
Roker
|
604979808a
|
add header lines for Cc: References: and In-Reply-To: in test mail
|
3 years ago |
Roker
|
53dba7e2dc
|
remove superfluous file.
|
3 years ago |
Roker
|
626b84f5a3
|
massive refactoring of unittest_rule to avoid copying of Rules and Rule& references to w0ng types, causing segfaults.
|
3 years ago |
Roker
|
168cb1b853
|
add more test cases and see: the parser 'encoded_word' caused the segfault!
|
3 years ago |
Roker
|
a192b64f0b
|
add unittest to test all rules, until I find the reason for the segfault. *sigh*
|
3 years ago |
Roker
|
964a1ffe81
|
add parsers for stringlist_t and identity_list_t.
|
3 years ago |
Roker
|
500cc465e0
|
Yay, now it parses correctly. \o/
|
3 years ago |
Roker
|
97937047be
|
and the unit test reveals: we have to use qi::hold[] to undo partial matching results. :-)
|
3 years ago |
Roker
|
51fc5d1c09
|
add unittest for adress parser...
|
3 years ago |
Roker
|
3fd694b52a
|
the WS around a 'word' are not part of the word but shall be omitted, according to RFC 5322. Aha!
|
3 years ago |
Roker
|
cfb3c11585
|
put the basic rules into separate TU. add parsers for e-mail addresses, simplified.
|
3 years ago |
Roker
|
1cd1df380c
|
add parse_address().
|
3 years ago |
Roker
|
858110c357
|
add test for Non-ASCII characters
|
3 years ago |
Roker
|
69c0d26124
|
add "language" flag after charset, according to RFC 2184. Does anyone really use that crap?
|
3 years ago |
Roker
|
db2c8950d2
|
add unittest_toutf8. Add to_upper() for charset to test for lower/mixed case charset in 2nd run, too.
|
3 years ago |
Roker
|
a82f0fbed6
|
add to_utf8.{hh|cc} I forgot them, sorry.
|
3 years ago |
Roker
|
dd9e059716
|
distinguish between qp_decode() and qp_decode_header(), because the latter recognizes '_' but no "Soft Line Breaks".
|
3 years ago |
Roker
|
193456be6b
|
Yeah, the RFC 2047 parser for "encoded_word"s works... \o/
|
3 years ago |
Roker
|
8404f9ad79
|
added Quoted-printable decoding. Encoding is TODO.
|
3 years ago |
Roker
|
4998d1ccec
|
make the functions inline to avoid Double Definition Errors in the linker.
|
3 years ago |
Roker
|
5e772c06f2
|
fold overlong code lines for more readability
|
3 years ago |
Roker
|
8288887ea6
|
add string_case.hh to allow string literals in case labels. Incl. unittest for hash collisions.
|
3 years ago |
Roker
|
0b9ca40418
|
add toUtf8() public API function for single characters. Rewrite existing toUtf8() to use that function, to avoid code duplication.
|
3 years ago |
Roker
|
edf0443bd6
|
TZ offsets needs to be subtracted to get GMT/UTC. Oops!
|
3 years ago |
Roker
|
adc365c14e
|
normalize TZ corrections. Fix parser of obs_zone, so it skips ws, too.
|
3 years ago |
Lars Rohwedder
|
5f04e3929e
|
fix #include and -lpthread for Linux.
|
3 years ago |
Roker
|
aecfdad73d
|
the parser was okay. But the test data contained U+2212 (MINUS) instead of ASCII hyphen-minus. m(
|
3 years ago |
Roker
|
06ed83d717
|
Don't use tm_gmtoff, because it is non-standard (and ignored by timegm(), so it is useless for my purpose).
|
3 years ago |
Roker
|
a3c0bab90b
|
use internal string literal instead of external files for test data
|
3 years ago |
Roker
|
22e9ae5cb2
|
rename test_mime.cc into unittest_mime.cc
|
3 years ago |
Roker
|
056f80479f
|
add NFC operations (moved from JsonServerAdapter)
|
3 years ago |