IMAP: Implement RFC 7888's LITERAL- extension
commit71ce76a671b853504b9ccd304efb6ae9128227f9
authorJan Kundrát <jkt@kde.org>
Fri, 27 May 2016 09:36:54 +0000 (27 11:36 +0200)
committerJan Kundrát <jkt@kde.org>
Fri, 27 May 2016 09:45:36 +0000 (27 11:45 +0200)
tree7c6f96f5be0fc8f1f3833eafff0931a7ac9972c4
parent795fa33376babcca963573063833004a4ac74a1c
IMAP: Implement RFC 7888's LITERAL- extension

This is a recent addition to the ever-growing family of IMAP RFCs. Its
aim is to solve a problem with LITERAL+ which allows and encourages IMAP
clients to send big chunks of data without asking the server for an OK
first. It turns out that this sometimes lead to wasted bandwidth.
LITERAL- on the other hand only allows this shortcut to happen for data
of up to 4096 kB.

As I expect some IMAP servers to start offering the LITERAL- extension
eventually, it is a good idea to be ready for this. If we didn't
implement LITERAL-, we would be stuck with the synchronizing literals
and therefore extra delays due to the network's RTT on those upcoming
servers at some point in future.

I'm so looking forward to servers which misimplement the RFC and start
rejecting based on ">= 4096" rather than "> 4096" :).

Change-Id: Ic0405dbd680d50f608a4c1644f07785c86b516e3
CMakeLists.txt
src/Imap/Model/Model.cpp
src/Imap/Parser/Parser.cpp
src/Imap/Parser/Parser.h
tests/Imap/test_Imap_Parser_write.cpp [new file with mode: 0644]
tests/Imap/test_Imap_Parser_write.h [new file with mode: 0644]