mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-11 22:03:09 -06:00
Core/POP3: MIMEHeader parsing improved
git-svn-id: svn://ultimatepp.org/upp/trunk@7272 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3a00114df3
commit
a357fbfd50
1 changed files with 6 additions and 0 deletions
|
|
@ -198,6 +198,9 @@ bool MIMEHeader::Parse(const char *s)
|
|||
while(!p.IsEof() && !p.IsChar(';'))
|
||||
p.SkipTerm();
|
||||
value = TrimBoth(String(b, p.GetPtr()));
|
||||
if(*value == '\'' && *value.Last() == '\'' || // mime type can be quoted...
|
||||
*value == '\"' && *value.Last() == '\"')
|
||||
value = TrimBoth(value.Mid(1, value.GetCount() - 2));
|
||||
while(!p.IsEof()) {
|
||||
if(p.Char(';') && p.IsId()) {
|
||||
const char *b = p.GetPtr();
|
||||
|
|
@ -206,6 +209,9 @@ bool MIMEHeader::Parse(const char *s)
|
|||
String id = ToLower(TrimBoth(String(b, p.GetPtr())));
|
||||
String val;
|
||||
if(p.Char('='))
|
||||
if(p.IsChar('\''))
|
||||
val = p.ReadString('\'');
|
||||
else
|
||||
if(p.IsString())
|
||||
val = p.ReadString();
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue