diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-09-09 09:51:48 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-09-09 09:51:48 +0000 |
commit | 0536396f0e2ed3e331f8d03bdc3b6c6013bf57eb (patch) | |
tree | 16fbc0bc1ed1272314d90aa3ae7d88d0dd71711c /imap.c | |
parent | 26f58985af2dc7ff7db6953a24146c3a9b27f4ec (diff) | |
download | fetchmail-0536396f0e2ed3e331f8d03bdc3b6c6013bf57eb.tar.gz fetchmail-0536396f0e2ed3e331f8d03bdc3b6c6013bf57eb.tar.bz2 fetchmail-0536396f0e2ed3e331f8d03bdc3b6c6013bf57eb.zip |
Caseblind capability checks.
svn path=/trunk/; revision=3456
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -236,10 +236,15 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting) capabilities[0] = '\0'; if ((ok = gen_transact(sock, "CAPABILITY")) == PS_SUCCESS) { + char *cp; + + /* capability checks are supposed to be caseblind */ + for (cp = capabilities; *cp; cp++) + *cp = toupper(*cp); + /* UW-IMAP server 10.173 notifies in all caps, but RFC2060 says we should expect a response in mixed-case */ - if (strstr(capabilities, "IMAP4REV1") || - strstr(capabilities, "IMAP4rev1")) + if (strstr(capabilities, "IMAP4REV1")) { imap_version = IMAP4rev1; if (outlevel >= O_DEBUG) |