From: Simon Josefsson <simon@josefsson.org>
To: nathanw@MIT.EDU (Nathan J. Williams)
Cc: ding@gnus.org
Subject: Re: patch - nnimap - case handling in STATUS command and response
Date: Mon, 03 Dec 2007 18:56:26 +0100 [thread overview]
Message-ID: <878x4bhdbp.fsf@mocca.josefsson.org> (raw)
In-Reply-To: <mtud4tn4s6z.fsf@contents-vnder-pressvre.mit.edu> (Nathan J. Williams's message of "Mon, 03 Dec 2007 12:13:40 -0500")
nathanw@MIT.EDU (Nathan J. Williams) writes:
> The function imap-mailbox-status is careful to send tokens in
> uppercase. imap-mailbox-status-async should be similarly careful. On
> the receiving end, imap-parse-status needs to upcase the tokens before
> applying string= to them, since the server might send them as
> lowercase.
>
> Noticed against MS Exchange 2007, which sends back STATUS tokens as
> lowercase if you sent them to it as lowercase.
Thanks, applied. Note that the server is broken here, the RFC is clear
that the status-att are upper case.
/Simon
> - Nathan
>
> Index: imap.el
> ===================================================================
> RCS file: /usr/local/cvsroot/gnus/lisp/imap.el,v
> retrieving revision 7.34
> diff -u -r7.34 imap.el
> --- imap.el 25 Oct 2007 08:17:54 -0000 7.34
> +++ imap.el 3 Dec 2007 17:12:25 -0000
> @@ -1526,10 +1526,11 @@
> (imap-send-command (list "STATUS \""
> (imap-utf7-encode mailbox)
> "\" "
> - (format "%s"
> - (if (listp items)
> - items
> - (list items)))))))
> + (upcase
> + (format "%s"
> + (if (listp items)
> + items
> + (list items))))))))
>
> (defun imap-mailbox-acl-get (&optional mailbox buffer)
> "Get ACL on mailbox from server in BUFFER."
> @@ -2517,7 +2518,7 @@
> (while (and (not (eq (char-after) ?\)))
> (or (forward-char) t)
> (looking-at "\\([A-Za-z]+\\) "))
> - (let ((token (match-string 1)))
> + (let ((token (upcase (match-string 1))))
> (goto-char (match-end 0))
> (cond ((string= token "MESSAGES")
> (imap-mailbox-put 'messages (read (current-buffer)) mailbox))
next prev parent reply other threads:[~2007-12-03 17:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 17:13 Nathan J. Williams
2007-12-03 17:56 ` Simon Josefsson [this message]
2007-12-03 18:09 ` Nathan J. Williams
2007-12-18 15:42 ` Simon Josefsson
2007-12-03 20:43 ` Reiner Steib
2007-12-03 22:14 ` Leo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878x4bhdbp.fsf@mocca.josefsson.org \
--to=simon@josefsson.org \
--cc=ding@gnus.org \
--cc=nathanw@MIT.EDU \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).