mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 17:40:11 +01:00
Fixed system/helper/mime.php header case sensitivity
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
8685574ede
commit
80c4978ac2
@ -317,17 +317,17 @@ class Piler_Mime_Decode {
|
|||||||
public static function fixMimeBodyPart($headers = array(), $body = '') {
|
public static function fixMimeBodyPart($headers = array(), $body = '') {
|
||||||
|
|
||||||
if(isset($headers['content-transfer-encoding'])) {
|
if(isset($headers['content-transfer-encoding'])) {
|
||||||
if($headers['content-transfer-encoding'] == 'quoted-printable') {
|
if(strtolower($headers['content-transfer-encoding']) == 'quoted-printable') {
|
||||||
$body = quoted_printable_decode($body);
|
$body = quoted_printable_decode($body);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($headers['content-transfer-encoding'] == 'base64') {
|
if(strtolower($headers['content-transfer-encoding']) == 'base64') {
|
||||||
$body = base64_decode($body);
|
$body = base64_decode($body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($headers['content-type']['charset'])) {
|
if(isset($headers['content-type']['charset'])) {
|
||||||
if($headers['content-type']['charset'] == 'gb2312') {
|
if(strtolower($headers['content-type']['charset']) == 'gb2312') {
|
||||||
$headers['content-type']['charset'] = 'GBK';
|
$headers['content-type']['charset'] = 'GBK';
|
||||||
}
|
}
|
||||||
$body = iconv($headers['content-type']['charset'], 'utf-8' . '//IGNORE', $body);
|
$body = iconv($headers['content-type']['charset'], 'utf-8' . '//IGNORE', $body);
|
||||||
|
Loading…
Reference in New Issue
Block a user