curl-library
RE: [PATCH] POP3: Expanded the supported commands
Date: Sat, 10 Mar 2012 19:44:46 +0000
Hi Daniel,
> > Do these functions need to do:
> >
> > If(pp->cache && !data->set.opt_no_body)
> >
> > For example or would you expect the cache to be empty if
> > CURLOPT_NOBODY was set?
>
> (sorry for the long delay for my response, I had missed this question)
No problem.
> I haven't really considered that before. I figure NOBODY for POP3 would
> basically mean that it should do everything except the actual request for
> the mail so it would skip that transfer - basically skipping the RETR
operation.
>
> The 'cache' is used for all responses so it will of course be used even in
NOBODY uses.
Okay... the above line of code seems to fix my issue... As such I now have
all the commands working and with little code modification.
I would appreciate it if you, Dan and anyone else who is interested could
give the following list a little review. The list contains all the proposed
command line arguments for all POP3 commands. I have only grouped them for
easy of reading here, the code I have written doesn't treat them any
differently (and in fact I have managed to keep the existing list and retr
response functions, dropping the list single function).
List Commands
--url pop3://mail.domain.com OR --url pop3://mail.domain.com -X LIST
--url pop3://mail.domain.com -X UIDL
Single List Commands
--url pop3://mail.domain.com/1 -l OR --url pop3://mail.domain.com -I -X
"LIST 1"
--url pop3://mail.domain.com -I -X "UIDL 1"
Retrieve Type Commands
--url pop3://mail.domain.com/1 OR --url pop3://mail.domain.com -X "RETR 1"
--url pop3://mail.domain.com -X "TOP 1 0"
--url pop3://mail.domain.com -X CAPA
Instructional Type Commands
--url pop3://mail.domain.com -I -X STAT
--url pop3://mail.domain.com -I -X NOOP
--url pop3://mail.domain.com -I -X "DELE 1"
--url pop3://mail.domain.com -I -X RSET
Obviously if a user was to specify the mailbox in the URL and perform -X
"DELE 1" the mailbox in the URL is currently ignored. We could append the
mailbox to the custom command which might be useful for LIST, UIDL and DELE
but that would cause problems for TOP as you NEED to specify either 0 for
"Just the headers" or the number of lines required from the message -
However I am flexible here so any opinions would be appreciated.
I will of course post code once v7.25 is out the door ;-)
Cheers
Steve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-03-10