cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] POP3: Expanded the supported commands

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 14 Mar 2012 21:26:06 +0100

On Tue, Mar 13, 2012 at 11:09:37PM +0000, Steve Holme wrote:
> At present I don't inspect the contents of the custom command, which means
> that 1) The user is free to send utter rubbish e.g --url
> pop3://mail.domain.com -I -X "UTTER RUBBISH" and the server will response
> with an appropriate error code and 2) Appending the mailbox to the command
> would work for DELE but the same code would then send "TOP 1 0 1" for --url
> pop3://mail.domain.com/1 -I -X "TOP 1 0" unless we tried to insert the
> mailbox between "TOP" and the number of rows. I'm happy to implement the
> simple append but it may be a little confusing.

The simple append makes -X work more like HTTP in that the argument
stays the same and only the command changes. That's less surprising to
the user for the most common cases.

As an aside, one thing to keep in mind while coding is to make sure that
\r\n is stripped out of the -X command (or return an error).

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-03-14