summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-06-05 10:44:48 +0000
committerthomascube <thomas@roundcube.net>2008-06-05 10:44:48 +0000
commitece3aed3665d2dd940c23d04b3b95d3c57962ad2 (patch)
tree0377b654a7d8d2b4cf611ce316427a91e9a1e0c4
parent0a99895ead5fec3e48719761a142a1c0a25d244c (diff)
Fix BODYSTRUCTURE response parsing: some servers respond like 'F1247 OK Completed (0.000 sec)'
-rw-r--r--program/lib/imap.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 0f3ac98f1..cec376859 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -2568,7 +2568,7 @@ function iil_C_FetchStructureString(&$conn, $folder, $id) {
$result .= $line;
} while (!preg_match("/^$key/", $line));
- $result = trim(substr($result, strpos($result, 'BODYSTRUCTURE')+13, -(strlen($result)-strrpos($result, ')')-1)));
+ $result = trim(substr($result, strpos($result, 'BODYSTRUCTURE')+13, -(strlen($result)-strrpos($result, $key)-2)));
}
}
return $result;