summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_imap.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-05 09:29:06 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-05 09:29:06 +0000
commit8b0d37d30f6f78b076303bb3adb7fa52f8a54dde (patch)
tree351b00ed61b4e1e24888c2ff13195bf4e33b3df2 /roundcubemail/program/include/rcube_imap.php
parent061a1ec3e3a178ea7ec559099433100b2113d70b (diff)
Respect Content-Location headers in multipart/related messages (#1484946)
git-svn-id: https://svn.roundcube.net/trunk@1736 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_imap.php')
-rw-r--r--roundcubemail/program/include/rcube_imap.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php
index 51e6b7dd5..439c55663 100644
--- a/roundcubemail/program/include/rcube_imap.php
+++ b/roundcubemail/program/include/rcube_imap.php
@@ -1149,16 +1149,17 @@ class rcube_imap
if (empty($struct->disposition))
$struct->disposition = 'inline';
}
+
+ // fetch message headers if message/rfc822 or named part (could contain Content-Location header)
+ if ($struct->ctype_primary == 'message' || ($struct->ctype_parameters['name'] && !$struct->content_id)) {
+ $part_headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $this->_msg_id, $struct->mime_id);
+ $struct->headers = $this->_parse_headers($part_headers) + $struct->headers;
+ }
- // fetch message headers if message/rfc822
- if ($struct->ctype_primary=='message')
- {
- $headers = iil_C_FetchPartBody($this->conn, $this->mailbox, $this->_msg_id, $struct->mime_id.'.HEADER');
- $struct->headers = $this->_parse_headers($headers);
-
+ if ($struct->ctype_primary=='message') {
if (is_array($part[8]) && empty($struct->parts))
$struct->parts[] = $this->_structure_part($part[8], ++$count, $struct->mime_id);
- }
+ }
// normalize filename property
$this->_set_part_filename($struct);