Gnus development mailing list
 help / color / mirror / Atom feed
From: Nikolaus Rath <Nikolaus@rath.org>
To: 21043@debbugs.gnu.org
Cc: eric@ericabrahamsen.net, ding@gnus.org, emacs-devel@gnu.org
Subject: bug#21043: [PATCH] nnimap.el: make capability parsing more robust.
Date: Sun, 12 Jul 2015 18:52:40 -0700	[thread overview]
Message-ID: <87615olt7b.fsf@vostro.rath.org> (raw)

Package: gnus
Tags: patch

Hello,

Currently Gnus relies on the server supplying the capabilities in its
response to the LOGIN command, e.g. like this:

  * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE
  SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT
  MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS
  LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES
  WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE BINARY MOVE SEARCH=FUZZY
  QUOTA\r\n
  1 OK Logged in\r\n

However, this assumption breaks if the server doesn't return the
capabilities automatically, or if he returns them as part of the OK
response, e.g.:

   160 OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten
   QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT
   CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SEARCH=FUZZY
   SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT
   THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 METADATA
   LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS LIST-METADATA WITHIN QRESYNC
   SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE DIGEST=SHA1
   X-REPLICATION LOGINDISABLED XCONVERSATIONS COMPRESS=DEFLATE
   X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE
   X-QUOTA=X-NUM-FOLDERS IDLE] User logged in
   SESSIONID=<sloti32d1t18-237747-1436749914-1-18339819756817078727>\r\n


Currently, in this situation Gnus just keeps re-using the pre-LOGIN
capabilities (and thus does not take advantage of any additional
features).

The attached patch fixes this issue by explicitly asking the server for
its capabilities after login.


Thanks for considering,
-Nikolaus


-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«





             reply	other threads:[~2015-07-13  1:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13  1:52 Nikolaus Rath [this message]
2015-07-13  5:35 ` Eric Abrahamsen
2015-07-13 19:00   ` Nikolaus Rath
2015-07-13 19:21     ` Lars Magne Ingebrigtsen
2015-07-14  0:37       ` Nikolaus Rath
2015-07-13 19:24     ` Lars Magne Ingebrigtsen
2015-07-14  0:36       ` Nikolaus Rath

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=87615olt7b.fsf@vostro.rath.org \
    --to=nikolaus@rath.org \
    --cc=21043@debbugs.gnu.org \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=eric@ericabrahamsen.net \
    /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).