diff options
author | alecpl <alec@alec.pl> | 2010-10-20 11:41:48 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-10-20 11:41:48 +0000 |
commit | e0bd7054b7e566bf156e8afdc6d4c790fed0c0f2 (patch) | |
tree | 6a862ddff28efd13bbc1c37e1d50d3355d7f64f1 /program/steps/mail/func.inc | |
parent | 2ae58f1b6782ad03cb4801b1eb2684f0d9351b32 (diff) |
- Add workaround for some Outlook's wrong content-types, per discussion in #1487051
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r-- | program/steps/mail/func.inc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 668d8c7e5..629e68bfd 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1717,6 +1717,16 @@ function rcmail_user_date() return $date; } +// Fixes some content-type names +function rcmail_fix_mimetype($name) +{ + // Some versions of Outlook create garbage Content-Type: + // application/pdf.A520491B_3BF7_494D_8855_7FAC2C6C0608 + if (preg_match('/^application\/pdf.+/', $name)) + $name = 'application/pdf'; + + return $name; +} function rcmail_search_filter($attrib) { |