add some new dependecies
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
diff -Nurb libvmime-0.9.2.orig/src/headerField.cpp libvmime-0.9.2.patched/src/headerField.cpp
|
||||
--- libvmime-0.9.2.orig/src/headerField.cpp 2010-05-20 05:33:45.000000000 -0700
|
||||
+++ libvmime-0.9.2.patched/src/headerField.cpp 2011-08-29 12:10:08.438497914 -0700
|
||||
@@ -157,14 +157,12 @@
|
||||
{
|
||||
contentsEnd = pos;
|
||||
pos += 2;
|
||||
- break;
|
||||
}
|
||||
else if (c == '\n')
|
||||
{
|
||||
contentsEnd = pos;
|
||||
++pos;
|
||||
- break;
|
||||
- }
|
||||
+ } else {
|
||||
|
||||
while (pos < end)
|
||||
{
|
||||
@@ -186,24 +184,13 @@
|
||||
|
||||
++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
|
||||
{
|
||||
@@ -0,0 +1,23 @@
|
||||
diff -Nurb libvmime-0.9.2.orig/src/parameterizedHeaderField.cpp libvmime-0.9.2.patched/src/parameterizedHeaderField.cpp
|
||||
--- libvmime-0.9.2.orig/src/parameterizedHeaderField.cpp (revision 603)
|
||||
+++ libvmime-0.9.2.patched/src/parameterizedHeaderField.cpp (working copy)
|
||||
@@ -97,7 +97,7 @@
|
||||
// Advance up to ';', if any
|
||||
string::size_type valueLength = 0;
|
||||
|
||||
- while (p < pend && *p != ';') // FIXME: support ";" inside quoted or RFC-2047-encoded text
|
||||
+ while (p < pend && *p != ';' && (!parserHelpers::isSpace(*p))) // FIXME: support ";" inside quoted or RFC-2047-encoded text
|
||||
{
|
||||
++p;
|
||||
++valueLength;
|
||||
@@ -118,6 +118,10 @@
|
||||
{
|
||||
std::map <string, paramInfo> params;
|
||||
|
||||
+ if (*p != ';')
|
||||
+ while (p < pend && *p != ';') // FIXME: support ";" inside quoted or RFC-2047-encoded text
|
||||
+ ++p;
|
||||
+
|
||||
while (*p == ';')
|
||||
{
|
||||
// Skip ';'
|
||||
@@ -0,0 +1,16 @@
|
||||
--- svn/src/wordEncoder.cpp (revision 603)
|
||||
+++ svn/src/wordEncoder.cpp (working copy)
|
||||
@@ -239,6 +239,13 @@
|
||||
if (buffer.find_first_of("\n\r") != string::npos)
|
||||
return true;
|
||||
|
||||
+ // If the string contains a QP string, we need to encode this.
|
||||
+ // Not a 100% check, but we'd only get more encoded strings.
|
||||
+ std::string::size_type pos = buffer.find("=?");
|
||||
+ std::string::size_type end = buffer.find("?=");
|
||||
+ if (pos != string::npos && end != string::npos && end > pos)
|
||||
+ return true;
|
||||
+
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
Index: svn/src/parameter.cpp
|
||||
===================================================================
|
||||
--- svn/src/parameter.cpp (revision 597)
|
||||
+++ svn/src/parameter.cpp (working copy)
|
||||
@@ -239,8 +239,21 @@
|
||||
{
|
||||
value << t.getWholeBuffer();
|
||||
|
||||
- if (!foundCharsetChunk)
|
||||
- ch = t.getWordAt(0)->getCharset();
|
||||
+ if (!foundCharsetChunk) {
|
||||
+ // this is still wrong. each word can have it's
|
||||
+ // own charset, and can be mixed (eg. iso-8859-1
|
||||
+ // and iso-2022-jp), but very unlikely.
|
||||
+ // real fix is to have parameters store a
|
||||
+ // vmime::text in stead of a vmime::word in
|
||||
+ // m_value. but that changes the interface
|
||||
+ for (size_t i = 0; i < t.getWordCount(); i++) {
|
||||
+ if (t.getWordAt(i)->getCharset() != ch && ch == charsets::US_ASCII) {
|
||||
+ ch = t.getWordAt(i)->getCharset();
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user