mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
IMAP: fix 3426383, implement CHARSET in SEARCH command, allow ASCII and UTF-8
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1826 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
396f6790c1
commit
73edf89a10
@ -63,7 +63,7 @@ public class ImapConnection extends AbstractConnection {
|
|||||||
* @param clientSocket IMAP client socket
|
* @param clientSocket IMAP client socket
|
||||||
*/
|
*/
|
||||||
public ImapConnection(Socket clientSocket) {
|
public ImapConnection(Socket clientSocket) {
|
||||||
super(ImapConnection.class.getSimpleName(), clientSocket, null);
|
super(ImapConnection.class.getSimpleName(), clientSocket, "UTF-8");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -878,6 +878,11 @@ public class ImapConnection extends AbstractConnection {
|
|||||||
condition = session.or();
|
condition = session.or();
|
||||||
} else if (token.startsWith("OR ")) {
|
} else if (token.startsWith("OR ")) {
|
||||||
condition = appendOrSearchParams(token, conditions);
|
condition = appendOrSearchParams(token, conditions);
|
||||||
|
} else if ("CHARSET".equals(token)) {
|
||||||
|
String charset = tokens.nextQuotedToken().toUpperCase();
|
||||||
|
if (!("ASCII".equals(charset) || "UTF-8".equals(charset))) {
|
||||||
|
throw new IOException("Unsupported charset "+charset);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (condition == null) {
|
if (condition == null) {
|
||||||
condition = session.and();
|
condition = session.and();
|
||||||
|
Loading…
Reference in New Issue
Block a user