diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-10-12 10:37:49 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-10-12 10:37:49 +0000 |
| commit | 9dad4dae978297286fa5ec1941a4f339e91f3813 (patch) | |
| tree | 236cff5613af3d323b8a2380c01b46d471bb3e00 /roundcubemail/program/include/rcube_imap.php | |
| parent | af6b2a680a1c1876954c83ff492e6ae38e4c8e60 (diff) | |
- Partially fixed "empty body" issue by showing raw body of malformed message (#1486166)
git-svn-id: https://svn.roundcube.net/trunk@3034 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_imap.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.php | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index 9ca1167ee..533f94177 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/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); |
