aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2010-05-14 16:56:20 +0000
committerVincent Richard <[email protected]>2010-05-14 16:56:20 +0000
commit13ae80a4c70a985fe53d75ea75522b29c421c2c9 (patch)
treeb4a6fd67d16028a385dad5b19b186e64875e5f26
parentUse STARTTLS for additional connections (thanks to Andrei). (diff)
downloadvmime-13ae80a4c70a985fe53d75ea75522b29c421c2c9.tar.gz
vmime-13ae80a4c70a985fe53d75ea75522b29c421c2c9.zip
Fixed parsing of header field value with no data on the first line (folding).
-rw-r--r--src/headerField.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/headerField.cpp b/src/headerField.cpp
index 52fe7e80..cdde8ece 100644
--- a/src/headerField.cpp
+++ b/src/headerField.cpp
@@ -146,6 +146,12 @@ ref <headerField> headerField::parseNext(const string& buffer, const string::siz
{
c = buffer[pos];
+ // Check for folded line
+ if (c == '\r' && pos + 2 < end && buffer[pos + 1] == '\n' &&
+ (buffer[pos + 2] == ' ' || buffer[pos + 2] == '\t'))
+ {
+ pos += 3;
+ }
// Check for end of contents
if (c == '\r' && pos + 1 < end && buffer[pos + 1] == '\n')
{