[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 64/116: imap: deal with commands case insensitively
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 64/116: imap: deal with commands case insensitively |
Date: |
Tue, 05 Dec 2017 14:51:34 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit e871ab56ed9cb0f3ab00b40e188f51cfb37b96cd
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Nov 9 00:26:21 2017 +0100
imap: deal with commands case insensitively
As documented in RFC 3501 section 9:
https://tools.ietf.org/html/rfc3501#section-9
Closes #2061
---
lib/imap.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib/imap.c b/lib/imap.c
index baa31a2f8..1b52f73a4 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -275,15 +275,15 @@ static bool imap_endofresp(struct connectdata *conn, char
*line, size_t len,
case IMAP_LIST:
if((!imap->custom && !imap_matchresp(line, len, "LIST")) ||
(imap->custom && !imap_matchresp(line, len, imap->custom) &&
- (strcmp(imap->custom, "STORE") ||
+ (!strcasecompare(imap->custom, "STORE") ||
!imap_matchresp(line, len, "FETCH")) &&
- strcmp(imap->custom, "SELECT") &&
- strcmp(imap->custom, "EXAMINE") &&
- strcmp(imap->custom, "SEARCH") &&
- strcmp(imap->custom, "EXPUNGE") &&
- strcmp(imap->custom, "LSUB") &&
- strcmp(imap->custom, "UID") &&
- strcmp(imap->custom, "NOOP")))
+ !strcasecompare(imap->custom, "SELECT") &&
+ !strcasecompare(imap->custom, "EXAMINE") &&
+ !strcasecompare(imap->custom, "SEARCH") &&
+ !strcasecompare(imap->custom, "EXPUNGE") &&
+ !strcasecompare(imap->custom, "LSUB") &&
+ !strcasecompare(imap->custom, "UID") &&
+ !strcasecompare(imap->custom, "NOOP")))
return FALSE;
break;
@@ -1053,7 +1053,7 @@ static CURLcode imap_state_select_resp(struct connectdata
*conn, int imapcode,
else if(imapcode == IMAP_RESP_OK) {
/* Check if the UIDVALIDITY has been specified and matches */
if(imap->uidvalidity && imapc->mailbox_uidvalidity &&
- strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity)) {
+ !strcasecompare(imap->uidvalidity, imapc->mailbox_uidvalidity)) {
failf(conn->data, "Mailbox UIDVALIDITY has changed");
result = CURLE_REMOTE_FILE_NOT_FOUND;
}
@@ -1526,9 +1526,9 @@ static CURLcode imap_perform(struct connectdata *conn,
bool *connected,
/* Determine if the requested mailbox (with the same UIDVALIDITY if set)
has already been selected on this connection */
if(imap->mailbox && imapc->mailbox &&
- !strcmp(imap->mailbox, imapc->mailbox) &&
+ strcasecompare(imap->mailbox, imapc->mailbox) &&
(!imap->uidvalidity || !imapc->mailbox_uidvalidity ||
- !strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity)))
+ strcasecompare(imap->uidvalidity, imapc->mailbox_uidvalidity)))
selected = TRUE;
/* Start the first command in the DO phase */
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 28/116: cmake: Export libcurl and curl targets to use by other cmake projects, (continued)
- [GNUnet-SVN] [gnurl] 28/116: cmake: Export libcurl and curl targets to use by other cmake projects, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 59/116: fnmatch: remove dead code, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 44/116: http2: Fixed OOM handling in upgrade request, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 61/116: content_encoding: fix inflate_stream for no bytes available, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 51/116: url: remove arg value check from CURLOPT_SSH_AUTH_TYPES, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 33/116: INTERNALS: remove curlx_tv* functions no longer provided, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 62/116: curl_multi_fdset.3: emphasize curl_multi_timeout, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 39/116: cookie: avoid NULL dereference, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 41/116: include: remove conncache.h inclusion from where its not needed, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 56/116: Makefile.m32: allow to customize brotli libs, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 64/116: imap: deal with commands case insensitively,
gnunet <=
- [GNUnet-SVN] [gnurl] 34/116: select: update comments, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 31/116: cli tool: improve "; type=" handling in -F option arguments, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 53/116: HTTP: implement Brotli content encoding, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 36/116: runtests.pl: Fixed typo in message, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 37/116: mkhelp.pl: support reproducible build, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 55/116: travis: add a job with brotli enabled, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 63/116: connect: store IPv6 connection status after valid connection, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 32/116: timeval: use mach time on MacOS, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 47/116: curl: pass through [] in URLs instead of calling globbing error, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 72/116: curl_share_setopt: va_end was not called if conncache errors, gnunet, 2017/12/05