mimeDecode.php - case sensitivity
| From: | Urs Gehrig | Date: | Fri, 21 Mar 2003 13:25:28 +0000 |
| Subject: | mimeDecode.php - case sensitivity | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-14533@lists.php.net to get a copy of this message | ||
dear all
does anyone know, if there is a certain reason why in mimeDecode.php in the
method _decodeHeader caseinsensitivity is used, while not in _decodeBody.
i was working on decoding moblie phone messages and it occurred, that mails
from the phone delivered uppercase information like "BASE64", which lead to
a decoded attachement, that was not base64_decoded.
so i applied a simple patch there just like in _decodeHeader, which now
works
for me. might there be a problem break existing applications?
i tried to reach richard, but with no success ;)
thanx, urs
--
Index: mimeDecode.php
===================================================================
RCS file: /repository/pear/Mail_Mime/mimeDecode.php,v
retrieving revision 1.36
diff -u -r1.36 mimeDecode.php
--- mimeDecode.php 4 Jan 2003 11:55:34 -0000 1.36
+++ mimeDecode.php 21 Mar 2003 09:56:47 -0000
@@ -1,6 +1,6 @@
<?Php
//
+-----------------------------------------------------------------------+
-// | Copyright (c) 2002-2003 Richard Heyes
|
+// | Copyright (c) 2002-2003 Richard Heyes
|
// | All rights reserved.
|
// |
|
// | Redistribution and use in source and binary forms, with or without
|
@@ -543,7 +543,7 @@
*/
function _decodeBody($input, $encoding = '7bit')
{
- switch ($encoding) {
+ switch (strtolower($encoding)) {
case '7bit':
return $input;
break;