Skip to content

Commit

Permalink
Be even more selective about when to use LITERAL+ when APPENDing
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Feb 20, 2015
1 parent c34c4eb commit efba72a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions framework/Imap_Client/lib/Horde/Imap/Client/Socket.php
Expand Up @@ -1818,13 +1818,13 @@ protected function _append(Horde_Imap_Client_Mailbox $mailbox, $data,
}

/* Although it is normally more efficient to use LITERAL+, disable if
* payload is over 0.5 MB because it allows the server to throw error
* payload is over 50 KB because it allows the server to throw error
* before we potentially push a lot of data to server that would
* otherwise be ignored (see RFC 4549 [4.2.2.3]).
* Additionally, if using BINARY, since so many IMAP servers have
* issues with APPEND + BINARY, don't use LITERAL+ since servers may
* send BAD after initial command. */
$cmd->literalplus = (($asize < 524288) && !$binary);
* Additionally, since so many IMAP servers have issues with APPEND
* + BINARY, don't use LITERAL+ since servers may send BAD
* (incorrectly) after initial command. */
$cmd->literalplus = (($asize < (1024 * 50)) && !$binary);

// If the mailbox is currently selected read-only, we need to close
// because some IMAP implementations won't allow an append. And some
Expand Down

0 comments on commit efba72a

Please sign in to comment.