From 39e8f0ef57163301e2a3c6b3bf65602e597ba469 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Fri, 17 Sep 2010 20:51:14 +0200 Subject: [PATCH] Make capabilties be case-insensitive. --- lisp/ChangeLog | 3 +++ lisp/nnimap.el | 14 ++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d0db6b14..876dfb553 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-09-17 Lars Magne Ingebrigtsen + * nnimap.el (nnimap-open-connection): Upcase all capabilities, and use + only upcased checks. + * nnmail.el (nnmail-article-group): Fix typo in "bogus" section. * nnimap.el (nnimap-open-shell-stream): New function. diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 53f247fd7..00432aadb 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -103,7 +103,7 @@ not done by default on servers that doesn't support that command.") (nnimap-article-ranges (gnus-compress-sequence articles)) (format "(UID RFC822.SIZE BODYSTRUCTURE %s)" (format - (if (member "IMAP4rev1" + (if (member "IMAP4REV1" (nnimap-capabilities nnimap-object)) "BODY.PEEK[HEADER.FIELDS %s]" "RFC822.HEADER.LINES %s") @@ -233,9 +233,11 @@ not done by default on servers that doesn't support that command.") (error "Unable to login to the server: %s" (mapconcat #'identity (cadr result) " "))) (setf (nnimap-capabilities nnimap-object) - (or (nnimap-find-parameter "CAPABILITY" (cdr result)) - (nnimap-find-parameter - "CAPABILITY" (cdr (nnimap-command "CAPABILITY"))))) + (mapcar + #'upcase + (or (nnimap-find-parameter "CAPABILITY" (cdr result)) + (nnimap-find-parameter + "CAPABILITY" (cdr (nnimap-command "CAPABILITY")))))) (when (member "QRESYNC" (nnimap-capabilities nnimap-object)) (nnimap-command "ENABLE QRESYNC")) t))))) @@ -279,7 +281,7 @@ not done by default on servers that doesn't support that command.") (erase-buffer) (setq result (nnimap-command - (if (member "IMAP4rev1" (nnimap-capabilities nnimap-object)) + (if (member "IMAP4REV1" (nnimap-capabilities nnimap-object)) "UID FETCH %d BODY.PEEK[]" "UID FETCH %d RFC822.PEEK") article))) @@ -805,7 +807,7 @@ not done by default on servers that doesn't support that command.") (nnimap-article-ranges articles) (format "(UID %s%s)" (format - (if (member "IMAP4rev1" + (if (member "IMAP4REV1" (nnimap-capabilities nnimap-object)) "BODY.PEEK[HEADER] BODY.PEEK" "RFC822.PEEK")) -- 2.34.1