Changeset e0bd705 in github


Ignore:
Timestamp:
Oct 20, 2010 7:41:48 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
8794f16
Parents:
2ae58f1
Message:
  • Add workaround for some Outlook's wrong content-types, per discussion in #1487051
Location:
program/steps/mail
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • program/steps/mail/func.inc

    r4438d667 re0bd705  
    17181718} 
    17191719 
     1720// Fixes some content-type names 
     1721function rcmail_fix_mimetype($name) 
     1722{ 
     1723  // Some versions of Outlook create garbage Content-Type: 
     1724  // application/pdf.A520491B_3BF7_494D_8855_7FAC2C6C0608 
     1725  if (preg_match('/^application\/pdf.+/', $name)) 
     1726    $name = 'application/pdf'; 
     1727 
     1728  return $name; 
     1729} 
    17201730 
    17211731function rcmail_search_filter($attrib) 
  • program/steps/mail/get.inc

    re019f2d re0bd705  
    9292    } 
    9393    else { 
     94      $mimetype = rcmail_fix_mimetype($mimetype); 
    9495      header("Content-Type: $mimetype"); 
    9596      header("Content-Transfer-Encoding: binary"); 
  • program/steps/mail/show.inc

    r6c6bb09 re0bd705  
    173173              JS_OBJECT_NAME, 
    174174              $attach_prop->mime_id, 
    175               $attach_prop->mimetype), 
     175              rcmail_fix_mimetype($attach_prop->mimetype)), 
    176176              'title' => Q($title), 
    177177            ), 
Note: See TracChangeset for help on using the changeset viewer.