cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: absolute paths only

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 25 Sep 2007 22:21:11 +0200 (CEST)

On Tue, 25 Sep 2007, junk_at_igrspace.com wrote:

> I really need a way to prevent libcurl from CWDing into the entry path upon
> a subsequent transfer (and connection re-use) as the user might be in
> another Tandem API.
>
> I'm attaching a patch which adds a new option to allow just that.
>
> Tell me what you think.

I think you need to eloborate, or possibly make it a new option that
CURLOPT_FTP_FILEMETHOD could be set to.

The reason is that if you'd set this new CURLOPT_FTP_ABSONLY option on a
default libcurl easy handle, you'll effectively break subsequent transfers in
a non-obvious way. It really does not make sense to set this option unless you
also at the same time *force* libcurl to only do absolute, full path CWD
commands. In my view, that would be nicer to offer as a new
CURLOPT_FTP_FILEMETHOD method. And if you force absolute paths, you either
need to convert all relative paths to absolute (in a way I'm not sure how it
can be done) or I think you should return error if a relative path is provided
in the URL.

Further, I would of course be very happy if you could provide one or two test
cases and a documentation update for this once we settle on how to do it...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-09-25