diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-07-31 14:48:00 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-07-31 14:48:00 +0000 |
| commit | bee31e245238edd3b0fba153e85064613a17a0e6 (patch) | |
| tree | f8a9018d6c33618f93aa34971c5532917761410d /roundcubemail/program | |
| parent | 2057e9c3379a8c832d84dcc6327e22a8edfd3614 (diff) | |
Ignore untagged responses when fetching BODYSTRUCTURE (patch by B. Johannessen)
git-svn-id: https://svn.roundcube.net/trunk@1616 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/lib/imap.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/roundcubemail/program/lib/imap.inc b/roundcubemail/program/lib/imap.inc index 757fbf6e8..da709faf3 100644 --- a/roundcubemail/program/lib/imap.inc +++ b/roundcubemail/program/lib/imap.inc @@ -2570,12 +2570,14 @@ function iil_C_FetchStructureString(&$conn, $folder, $id) { if (iil_C_Select($conn, $folder)) { $key = 'F1247'; - + if (iil_PutLine($fp, "$key FETCH $id (BODYSTRUCTURE)")) { do { $line = iil_ReadLine($fp, 5000); $line = iil_MultLine($fp, $line); - $result .= $line; + list(, $index, $rest) = explode(' ', $line); + if ($index == $id || preg_match("/^$key/", $line)) + $result .= $line; } while (!preg_match("/^$key/", $line)); $result = trim(substr($result, strpos($result, 'BODYSTRUCTURE')+13, -(strlen($result)-strrpos($result, $key)+1))); |
