dovecot-1.2: imap-parser: Added IMAP_PARSE_FLAG_MULTILINE_STR flag.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Mar 18 20:41:04 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/c9d6ae6f10fe
changeset: 8837:c9d6ae6f10fe
user: Timo Sirainen <tss at iki.fi>
date: Wed Mar 18 14:40:58 2009 -0400
description:
imap-parser: Added IMAP_PARSE_FLAG_MULTILINE_STR flag.
diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
src/lib-imap/imap-parser.c | 3 ++-
src/lib-imap/imap-parser.h | 4 +++-
diffs (27 lines):
diff -r dc6880dcbbba -r c9d6ae6f10fe src/lib-imap/imap-parser.c
--- a/src/lib-imap/imap-parser.c Wed Mar 18 13:59:58 2009 -0400
+++ b/src/lib-imap/imap-parser.c Wed Mar 18 14:40:58 2009 -0400
@@ -304,7 +304,8 @@ static int imap_parser_read_string(struc
/* check linebreaks here, so escaping CR/LF isn't possible.
string always ends with '"', so it's an error if we found
a linebreak.. */
- if (is_linebreak(data[i])) {
+ if (is_linebreak(data[i]) &&
+ (parser->flags & IMAP_PARSE_FLAG_MULTILINE_STR) == 0) {
parser->error = "Missing '\"'";
return FALSE;
}
diff -r dc6880dcbbba -r c9d6ae6f10fe src/lib-imap/imap-parser.h
--- a/src/lib-imap/imap-parser.h Wed Mar 18 13:59:58 2009 -0400
+++ b/src/lib-imap/imap-parser.h Wed Mar 18 14:40:58 2009 -0400
@@ -28,7 +28,9 @@ enum imap_parser_flags {
/* Return literals as IMAP_ARG_LITERAL instead of IMAP_ARG_STRING */
IMAP_PARSE_FLAG_LITERAL_TYPE = 0x04,
/* Don't check if atom contains invalid characters */
- IMAP_PARSE_FLAG_ATOM_ALLCHARS = 0x08
+ IMAP_PARSE_FLAG_ATOM_ALLCHARS = 0x08,
+ /* Allow strings to contain CRLFs */
+ IMAP_PARSE_FLAG_MULTILINE_STR = 0x10
};
enum imap_arg_type {
More information about the dovecot-cvs
mailing list