libvmime/vmime-0.9.2-header-value-on-next-line.diff

47 lines
1.2 KiB
Diff

---
src/headerField.cpp | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/src/headerField.cpp b/src/headerField.cpp
index 1d33dac..ec575dc 100644
--- a/src/headerField.cpp
+++ b/src/headerField.cpp
@@ -160,16 +160,14 @@ ref <headerField> headerField::parseNext
{
contentsEnd = pos;
pos += 2;
- break;
}
else if (c == '\n')
{
contentsEnd = pos;
++pos;
- break;
}
- while (pos < end)
+ else while (pos < end)
{
c = buffer[pos];
@@ -195,18 +193,6 @@ ref <headerField> headerField::parseNext
{
// 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
{
--