File vmime-0.9.2-header-value-on-next-line.diff of Package libvmime_zarafa7
---
src/headerField.cpp | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
Index: vmime/src/headerField.cpp
===================================================================
--- vmime.orig/src/headerField.cpp
+++ vmime/src/headerField.cpp
@@ -157,14 +157,12 @@ ref <headerField> headerField::parseNext
{
contentsEnd = pos;
pos += 2;
- break;
}
else if (c == '\n')
{
contentsEnd = pos;
++pos;
- break;
- }
+ } else {
while (pos < end)
{
@@ -186,24 +184,13 @@ ref <headerField> headerField::parseNext
++pos;
}
+ }
// Handle the case of folded lines
if (buffer[pos] == ' ' || buffer[pos] == '\t')
{
// This is a folding white-space: we keep it as is and
// we continue with contents parsing...
-
- // If the line contains only space characters, we assume it is
- // the end of the headers. This is not strictly standard-compliant
- // but, hey, we can't fail when parsing some malformed mails...
- while (pos < end && (buffer[pos] == ' ' || buffer[pos] == '\t'))
- ++pos;
-
- if ((pos < end && buffer[pos] == '\n') ||
- (pos + 1 < end && buffer[pos] == '\r' && buffer[pos + 1] == '\n'))
- {
- break;
- }
}
else
{