[Twisted-Python] Re: IMAP fixes
Tony Meyer
ta-meyer at ihug.co.nz
Sun Jul 6 21:57:45 MDT 2003
Regarding the new parameter parsing for the IMAP server:
At the moment, FETCH args are parsed with ParseNestedList, which means that
any items inside [] are appended as an additional list.
For example, this command:
0003 FETCH 1 BODY.PEEK[HEADER.FIELDS (References X-Ref)] UID
Becomes:
['BODY.PEEK', ['HEADER.FIELDS', ['References', 'X-Ref']], UID]
There are really two items that have been requested - BODY.PEEK and UID, but
the args list has three, because the BODY.PEEK information has been split
into a separate item.
It seems to me that it would make more sense for the result to be:
[['BODY.PEEK', ['HEADER.FIELDS', ['References', 'X-Ref']]], UID]
Or something like that, which keeps the body.peek information together.
(Note that BODY and BODY.PEEK are the only two FETCH args that have a []
part.)
This is both closer to what was requested, and much easier to parse (IMO).
Thoughts? (I'm happy to write a patch, but there doesn't seem much point if
people don't agree).
=Tony Meyer
More information about the Twisted-Python
mailing list