Opened 15 years ago
Closed 15 years ago
#2695 defect closed fixed (fixed)
IMAP4Client breaks if server uses CONDSTORE
Reported by: | slamb | Owned by: | Jean-Paul Calderone |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | Keywords: | ||
Cc: | slamb, therve | Branch: | |
Author: |
Description
My Cyrus server's capabilities line looks like this:
* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS] hobbes.slamb.org Cyrus IMAP4 v2.3.7-Invoca-RPM-2.3.7-4.centos4.slamb server ready 1 capability * CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE CATENATE CONDSTORE IDLE LISTEXT LIST-SUBSCRIBED X-NETSCAPE URLAUTH 1 OK Completed
Note the RFC:4551 stuff: CONDSTORE SORT SORT=MODSEQ
. As of latest imap4.py (lastchangerev [18812]), this doesn't breaks IMAP4Client:
File "/usr/lib64/python2.4/site-packages/twisted/mail/imap4.py", line 2300, in __cbCapabilities caps.setdefault(cap[:eq], []).append(cap[eq+1:]) exceptions.AttributeError: 'NoneType' object has no attribute 'append'
Here's a fix, but I don't have unit tests right now. Note I decided to keep the cap unchanged if, say, SORT=MODSEQ
precedes SORT
.
--- imap4.py (revision 20482) +++ imap4.py (working copy) @@ -2295,7 +2295,7 @@ for cap in rest: eq = cap.find('=') if eq == -1: - caps[cap] = None + caps[cap] = caps.get(cap, []) else: caps.setdefault(cap[:eq], []).append(cap[eq+1:]) self._capCache = caps
Attachments (1)
Change History (6)
comment:1 Changed 15 years ago by
Cc: | slamb added |
---|
Changed 15 years ago by
Attachment: | imap4.diff added |
---|
comment:2 Changed 15 years ago by
Keywords: | review added |
---|---|
Owner: | Jean-Paul Calderone deleted |
Fixed in imap4-mixed-capabilities-2695
comment:3 Changed 15 years ago by
Priority: | normal → highest |
---|
comment:4 Changed 15 years ago by
Cc: | therve added |
---|---|
Keywords: | review removed |
Owner: | set to Jean-Paul Calderone |
I didn't spot any problem, please merge.
comment:5 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
This is the same diff as the previous post except that is preserves the current external Twisted Capabilities API