Browse Source

re-enable MIME-11 features. :-D

MIME-10
Roker 2 years ago
parent
commit
125846de36
1 changed files with 7 additions and 8 deletions
  1. +7
    -8
      src/bodyparser.cc

+ 7
- 8
src/bodyparser.cc View File

@ -129,13 +129,13 @@ struct has_mimetype
};
void set_longmsg(message* msg, const Message& m)
void set_longmsg(message* msg, const MimeHeaders& mh, const BodyLines& body)
{
const sv txt_charset = header_value( m.mh.tparams, "charset" );
const sv format = header_value( m.mh.tparams, "format");
const sv delsp = header_value( m.mh.tparams, "delsp");
const sv txt_charset = header_value( mh.tparams, "charset" );
const sv format = header_value( mh.tparams, "format");
const sv delsp = header_value( mh.tparams, "delsp");
msg->longmsg = create_string(m.body, txt_charset, m.mh.decoder );
msg->longmsg = create_string(body, txt_charset, mh.decoder );
if(format.size())
{
add_opt_field(msg, Pseudo_Header_Format, format);
@ -179,8 +179,7 @@ void handle_multipart(message* msg, const MimeHeaders& mh, const BodyLines& body
if(mime_type=="text/plain" && msg->longmsg==nullptr)
{
// the first "text/plain" part is handeld specially:
const sv mc_charset = header_value( m.mh.tparams, "charset" );
msg->longmsg = create_string(m.body, mc_charset, m.mh.decoder );
set_longmsg(msg, m.mh, m.body);
continue;
}else if(mime_type=="text/html" && msg->longmsg_formatted==nullptr)
{
@ -205,7 +204,7 @@ void handle_mime(message* msg, const MimeHeaders& mh, const BodyLines& body)
if(mh.subtype == "plain" && msg->longmsg==nullptr)
{
// put it in msg->longmsg
msg->longmsg = create_string(body, charset, mh.decoder);
set_longmsg(msg, mh, body);
}else if(mh.subtype=="html" && msg->longmsg_formatted==nullptr)
{
// put it in msg->longmsg_formatted


Loading…
Cancel
Save