cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: cookie and CURLOPT_COOKIEFILE

From: Jerry G. Chiuan <jerry_at_oridus.com>
Date: Wed, 17 Sep 2003 10:07:42 -0700

> Subject: Re: cookie and CURLOPT_COOKIEFILE
> On Wed, 17 Sep 2003 jerry_at_oridus.com wrote:
> > curl_easy_setopt(handle_name, CURLOPT_COOKIEFILE, "" )
>
> Did you even try to do this? AFAICT, this is indeed a working way.
>
> > curl_easy_setopt(handle_name, CURLOPT_COOKIEFILE)
>
> This is not possible to detect and will never be a good way to specify
> anything.
>
> > nobody ca 100% guarantee the filename doesn't exist.
>
> I wrote "next to guaranteed" on purpose. Most systems can be very certain
a
> specific full path name won't exist, or will be zero bytes.
>
> But since sending in a zero-length file name works too, this issue is moot
> anyway.

Hi Daniel,
It doesn't work in my case, VC++ pops up "fopen( ) error"
could you please tell me how to specify "empty" file?
I don't want to specify a file which I know not to exist, what if somebody
accidentally creates a file with exactly the same absolute path!

> > Therefore, I think we can remove "pass file which doesn't exist" from
> > document for people who simply want to retrive cookie from server side,
not
> > existing file in disk.
>
> I don't understand. That's how libcurl currently works, why would we
remove
> that paragraph from the document?

I mean, if we can specify "empty" file for libcurl to "simply turn on cookie
parser" instead of reading from existing cookie file, we don't need to
mention "pass file which doesn't exist" for *this purpose*

- Jerry

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-17

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET