IMAP4 non-synchronizing literals
obsoleted by
- rfc-7888 — IMAP4 Non-synchronizing Literals
updated by
- rfc-4466 — Collected Extensions to IMAP4 ABNF
Extracted elements (11)
IMAP4 requires the client to wait for a server command continuation request between sending the octet count and the literal string data. The non-synchronizing literal eliminates this network round-trip, improving efficiency for client-to-server communication.
Non-synchronizing literals may only be used with servers that advertise LITERAL+ capability; the IMAP4 synchronizing literal (without '+') remains valid and must be used with servers that do not support the extension.
A server MAY still process commands and reject errors on a line-by-line basis, as long as it checks for non-synchronizing literals at the end of each line.
If the server does not advertise the LITERAL+ capability, the client must use synchronizing literals instead of non-synchronizing literals.
The protocol receiver of an IMAP4 server must check the end of every received line for the pattern `{octet-count+}` immediately preceding the CRLF, which signals a non-synchronizing literal.
The server does not generate a command continuation request in response to a non-synchronizing literal, and clients are not required to wait before sending the octets.
Upon detecting a non-synchronizing literal, the server MUST treat the specified number of following octets and the following line as part of the same command.
The LITERAL+ capability is advertised by IMAP4 servers in response to the CAPABILITY command to signal support for non-synchronizing literals. Clients must check for this capability before using non-synchronizing literals.
There are no known security issues with the LITERAL+ extension.
A non-synchronizing literal is distinguished from a synchronizing literal by a plus sign ('+') inserted between the octet count and the closing brace: `{number+}CRLF *CHAR8`. The synchronizing form lacks the plus sign.
Formal syntax: `literal ::= "{" number ["+"] "}" CRLF *CHAR8` where number represents the count of CHAR8 octets. The optional '+' distinguishes non-synchronizing from synchronizing literals.