cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Feature-Request for libcurl, was: Making a directory

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 19 Dec 2001 11:32:15 +0100 (MET)

On Wed, 19 Dec 2001, Guido Neitzer wrote:

[comments follow bellow]

> > Hm, I'm having a hard time to make up my mind on this.
> >
> > What would you say about a more generic approach? Like a way to prevent
> > libcurl from issueing specific FTP commands.
> >
> > To prevent a download, you'd tell curl to skip PASV and RETR.
>
> Hmmm. I don't know enough about libcurl and ftp to answer this question,
> but as far as I understand the ftp rfc this would be enough to handle a
> "command only" behaviour.
>
> If we use this approach, I would have to add
>
> curl_easy_setopt (curl, SKIP_PASV, TRUE);
> curl_easy_setopt (curl, SKIP_RETR, TRUE);
>
> and do all the other stuff as I do it now, right? That's absolutely okay
> for me, but I can't see a big difference between this and my former
> suggestion. In both ways you have the option to do:
>
> 1. Only transmit commands.
>
> 2. Work through a pre download/upload command list, do the download/upload
> and do some commands after that.
>
> > Or would that be making things more flexible than they need to be?
>
> Please explain the difference of the two approaches. I can't see a real
> difference - but, I said that, I'm not experienced with ftp or curl or
> libcurl.

The difference for you here would be exactly nada. The point is instead that
when I add/change things in the library I try to implement things general
enough to appeal to the general library using public.

The general approach I suggested would enable other tricks that you didn't
ask for, but that others might want, and at the same time it would enable
what you asked for.

However, I think you pressed the right button when you mentioned the RFC. We
already have too much protocol-specific stuff in the library interface, and
having the option called SKIP_TRANSFER would be meaningful even for the large
crowds who haven't the full insights on what RETR is...

*uh*

What if we instead made it work this way (using already supported options):

Set CURLOPT_NOBODY to TRUE!

;-)

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-12-19