[Python-bugs-list] Patch for poplib LIST command (PR#100)

deirdre@linuxcare.com deirdre@linuxcare.com
Fri, 8 Oct 1999 19:42:49 -0400 (EDT)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--4786689-1676962025-939425855=:8432
Content-Type: TEXT/PLAIN; charset=US-ASCII

There are two syntaxes for the LIST command; both were assumed to be
multiline however only one of them is per RFC 1939.

From the RFC, the syntax for LIST n:


             C: LIST 2
             S: +OK 2 200

The patch below fixes poplib.py (as it'll be munged my my MUA, I've
attached a copy also):

8d7
< Updated: Deirdre Saoirse <deirdre@linuxcare.com>, <deirdre@deirdre.net> [Oct '99]
202,210c201,203
< 		Two syntaxes:
< 		LIST (no parameter):
< 		Result is in form ['response', ['mesg_num octets', ...], 39].
< 		This is a "long" command as it is a multiline response.
< 		
< 		LIST (with parameter):
< 		Response is for specified message number
< 		Result is in form ['response', 'mesg_num octets'].
< 		This is a "short" command as it is a one-line response.
---
> 		Result is in form ['response', ['mesg_num octets', ...]].
> 
> 		Unsure what the optional 'msg' arg does.
213,214c206
< 			return self._shortcmd('LIST %s' % which)
< 		
---
> 			return self._longcmd('LIST %s' % which)

-- 
Deirdre Saoirse, Systems Analyst, Linuxcare, Inc.
415.354.4878 x252 tel, 415.701.7457 fax
dsaoirse@linuxcare.com, http://www.linuxcare.com/
Linuxcare. At the center of Linux.

--4786689-1676962025-939425855=:8432
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=poplibdiff
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.9910081637350.8432@gentoo.linuxcare.com>
Content-Description: 
Content-Disposition: attachment; filename=poplibdiff

OGQ3DQo8IFVwZGF0ZWQ6IERlaXJkcmUgU2FvaXJzZSA8ZGVpcmRyZUBsaW51
eGNhcmUuY29tPiwgPGRlaXJkcmVAZGVpcmRyZS5uZXQ+IFtPY3QgJzk5XQ0K
MjAyLDIxMGMyMDEsMjAzDQo8IAkJVHdvIHN5bnRheGVzOg0KPCAJCUxJU1Qg
KG5vIHBhcmFtZXRlcik6DQo8IAkJUmVzdWx0IGlzIGluIGZvcm0gWydyZXNw
b25zZScsIFsnbWVzZ19udW0gb2N0ZXRzJywgLi4uXSwgMzldLg0KPCAJCVRo
aXMgaXMgYSAibG9uZyIgY29tbWFuZCBhcyBpdCBpcyBhIG11bHRpbGluZSBy
ZXNwb25zZS4NCjwgCQkNCjwgCQlMSVNUICh3aXRoIHBhcmFtZXRlcik6DQo8
IAkJUmVzcG9uc2UgaXMgZm9yIHNwZWNpZmllZCBtZXNzYWdlIG51bWJlcg0K
PCAJCVJlc3VsdCBpcyBpbiBmb3JtIFsncmVzcG9uc2UnLCAnbWVzZ19udW0g
b2N0ZXRzJ10uDQo8IAkJVGhpcyBpcyBhICJzaG9ydCIgY29tbWFuZCBhcyBp
dCBpcyBhIG9uZS1saW5lIHJlc3BvbnNlLg0KLS0tDQo+IAkJUmVzdWx0IGlz
IGluIGZvcm0gWydyZXNwb25zZScsIFsnbWVzZ19udW0gb2N0ZXRzJywgLi4u
XV0uDQo+IA0KPiAJCVVuc3VyZSB3aGF0IHRoZSBvcHRpb25hbCAnbXNnJyBh
cmcgZG9lcy4NCjIxMywyMTRjMjA2DQo8IAkJCXJldHVybiBzZWxmLl9zaG9y
dGNtZCgnTElTVCAlcycgJSB3aGljaCkNCjwgCQkNCi0tLQ0KPiAJCQlyZXR1
cm4gc2VsZi5fbG9uZ2NtZCgnTElTVCAlcycgJSB3aGljaCkNCg==
--4786689-1676962025-939425855=:8432--