diff options
author | alecpl <alec@alec.pl> | 2010-11-18 10:34:10 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-11-18 10:34:10 +0000 |
commit | 0f9d8ca40de826733f0507b9706d18dd1e8719f4 (patch) | |
tree | 05908f4e9194196867ea2d448cc244dd0540f6d9 /program | |
parent | effdb3c01d999adb3a70bac606153c8d550ce969 (diff) |
- Don't set attachment's charset in Content-type header (#1487122)
Diffstat (limited to 'program')
-rw-r--r-- | program/include/rcube_shared.inc | 6 | ||||
-rw-r--r-- | program/steps/mail/sendmail.inc | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc index b79ab367e..d6d91e03f 100644 --- a/program/include/rcube_shared.inc +++ b/program/include/rcube_shared.inc @@ -477,9 +477,9 @@ function rc_mime_content_type($path, $name, $failover = 'application/octet-strea $mime_type = $failover; } else { - // sometimes content-type contains charset definition, - // remove useless "charset=binary", should we remove any charset def. here? - $mime_type = preg_replace('/; charset=binary;*/i', '', $mime_type); + // Sometimes (PHP-5.3?) content-type contains charset definition, + // Remove it (#1487122) also "charset=binary" is useless + $mime_type = array_shift(preg_split('/[; ]/', $mime_type)); } return $mime_type; diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index c8ceb8f80..81e5a214e 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -503,7 +503,7 @@ if (is_array($_SESSION['compose']['attachments'])) ($attachment['data'] ? false : true), ($ctype == 'message/rfc822' ? '8bit' : 'base64'), ($ctype == 'message/rfc822' ? 'inline' : 'attachment'), - $message_charset, '', '', + '', '', '', $CONFIG['mime_param_folding'] ? 'quoted-printable' : NULL, $CONFIG['mime_param_folding'] == 2 ? 'quoted-printable' : NULL ); |