diff options
author | alecpl <alec@alec.pl> | 2009-10-12 10:37:49 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-10-12 10:37:49 +0000 |
commit | 4f69328132beae439d1aecb6d35d55392e480eca (patch) | |
tree | 0739dd72cb4059acb9f0896adc5bdd5fe5085d27 /program/include/rcube_imap.php | |
parent | a9bfe21ba6329cf413b8965c8ce225308bcb6e57 (diff) |
- Partially fixed "empty body" issue by showing raw body of malformed message (#1486166)
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r-- | program/include/rcube_imap.php | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 9ca1167ee..533f94177 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -1226,17 +1226,15 @@ class rcube_imap else $this->struct_charset = $this->_structure_charset($structure); - /* - @TODO: here we can recognize malformed BODYSTRUCTURE and parse - the message in other way to create our own message structure. - Example of structure for malformed MIME message: - ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 2154 70 NIL NIL NIL) - - if ($headers->ctype != 'text/plain' - && !is_array($structure[0]) && $structure[0] == 'text' - && !is_array($structure[1]) && $structure[1] == 'plain') - { } - */ + // Here we can recognize malformed BODYSTRUCTURE and + // 1. [@TODO] parse the message in other way to create our own message structure + // 2. or just show the raw message body. + // Example of structure for malformed MIME message: + // ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 2154 70 NIL NIL NIL) + if ($headers->ctype && $headers->ctype != 'text/plain' + && $structure[0] == 'text' && $structure[1] == 'plain') { + return false; + } $struct = &$this->_structure_part($structure); $struct->headers = get_object_vars($headers); |