- Speed up raw message body handling (call FETCH only once for the whole message insteade of twice for headers and body)
| | |
| | | 2008/11/19 (alec) |
| | | ---------- |
| | | - Fix handling of some malformed messages (#1484438) |
| | | - Speed up raw message body handling |
| | | |
| | | 2008/11/15 (alec) |
| | | ---------- |
| | |
| | | if (!($msg_id = $this->_uid2id($uid))) |
| | | return FALSE; |
| | | |
| | | $body = iil_C_FetchPartHeader($this->conn, $this->mailbox, $msg_id, NULL); |
| | | $body .= iil_C_HandlePartBody($this->conn, $this->mailbox, $msg_id, NULL, 1); |
| | | |
| | | return $body; |
| | | return iil_C_HandlePartBody($this->conn, $this->mailbox, $msg_id); |
| | | } |
| | | |
| | | |
| | |
| | | if (!($msg_id = $this->_uid2id($uid))) |
| | | return FALSE; |
| | | |
| | | print iil_C_FetchPartHeader($this->conn, $this->mailbox, $msg_id, NULL); |
| | | flush(); |
| | | iil_C_HandlePartBody($this->conn, $this->mailbox, $msg_id, NULL, 2); |
| | | } |
| | | |
| | |
| | | - added BYE response simple support for endless loop prevention |
| | | - added 3rd argument in iil_StartsWith* functions |
| | | - fix iil_C_FetchPartHeader() in some cases by use of iil_C_HandlePartBody() |
| | | - allow iil_C_HandlePartBody() to fetch whole message |
| | | |
| | | ********************************************************/ |
| | | |
| | |
| | | return iil_C_HandlePartBody(&$conn, $mailbox, $id, $part, 1); |
| | | } |
| | | |
| | | function iil_C_HandlePartBody(&$conn, $mailbox, $id, $part, $mode, $file=NULL) { |
| | | function iil_C_HandlePartBody(&$conn, $mailbox, $id, $part='', $mode=1, $file=NULL) { |
| | | /* modes: |
| | | 1: return string (or write to $file pointer) |
| | | 2: print |
| | |
| | | |
| | | $fp = $conn->fp; |
| | | $result = false; |
| | | if (empty($part)) { |
| | | $part = 'TEXT'; |
| | | } |
| | | |
| | | if (iil_C_Select($conn, $mailbox)) { |
| | | $reply_key = '* ' . $id; |