diff options
| author | Vincent Richard <[email protected]> | 2014-09-19 18:31:43 +0200 |
|---|---|---|
| committer | Vincent Richard <[email protected]> | 2014-09-19 18:31:43 +0200 |
| commit | a32bb6c954df95b80209300c960823937db48ac3 (patch) | |
| tree | dd4a8163c5df9a4fcbc15681193a21f295c6bda2 /src | |
| parent | Fixed hostname matching for OpenSSL (thanks to ElmüSoft). (diff) | |
| download | vmime-a32bb6c954df95b80209300c960823937db48ac3.tar.gz vmime-a32bb6c954df95b80209300c960823937db48ac3.zip | |
Fixed 'body_fld_lang' optional in IMAP response.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vmime/net/imap/IMAPParser.hpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/vmime/net/imap/IMAPParser.hpp b/src/vmime/net/imap/IMAPParser.hpp index c71d4f93..44f9d23b 100644 --- a/src/vmime/net/imap/IMAPParser.hpp +++ b/src/vmime/net/imap/IMAPParser.hpp @@ -3743,8 +3743,8 @@ public: // // body_ext_mpart ::= body_fld_param - // [SPACE body_fld_dsp SPACE body_fld_lang - // [SPACE 1#body_extension]] + // [SPACE body_fld_dsp [SPACE body_fld_lang + // [SPACE 1#body_extension]]] // ;; MUST NOT be returned on non-extensible // ;; "BODY" fetch @@ -3774,20 +3774,23 @@ public: VIMAP_PARSER_GET(IMAPParser::body_fld_param, m_body_fld_param); - // [SPACE body_fld_dsp SPACE body_fld_lang [SPACE 1#body_extension]] + // [SPACE body_fld_dsp [SPACE body_fld_lang [SPACE 1#body_extension]]] if (VIMAP_PARSER_TRY_CHECK(SPACE)) { VIMAP_PARSER_GET(IMAPParser::body_fld_dsp, m_body_fld_dsp); - VIMAP_PARSER_CHECK(SPACE); - VIMAP_PARSER_GET(IMAPParser::body_fld_lang, m_body_fld_lang); - // [SPACE 1#body_extension] if (VIMAP_PARSER_TRY_CHECK(SPACE)) { - VIMAP_PARSER_GET_PUSHBACK(body_extension, m_body_extensions); + VIMAP_PARSER_GET(IMAPParser::body_fld_lang, m_body_fld_lang); - while (VIMAP_PARSER_TRY_CHECK(SPACE)) + // [SPACE 1#body_extension] + if (VIMAP_PARSER_TRY_CHECK(SPACE)) + { VIMAP_PARSER_GET_PUSHBACK(body_extension, m_body_extensions); + + while (VIMAP_PARSER_TRY_CHECK(SPACE)) + VIMAP_PARSER_GET_PUSHBACK(body_extension, m_body_extensions); + } } } |
