cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: unsetting/resetting parameters

From: Roch Mangenot <roch.mangenot_at_netcentrex.net>
Date: Mon, 15 Dec 2003 11:05:02 +0100

ok thanks a lot.
I was using libcurl-7.10.7. I just upgraded and it now works just fine.

Roch

PS : thanks for the reply in less than half an hour ! your doing an awesome
job with libcurl and this mailing list.

-----Message d'origine-----
De : curl-library-admin_at_lists.sourceforge.net
[mailto:curl-library-admin_at_lists.sourceforge.net]De la part de Daniel
Stenberg
Envoye : lundi 15 decembre 2003 09:58
A : LibCurl
Objet : Re: unsetting/resetting parameters

On Mon, 15 Dec 2003, Roch Mangenot wrote:

> I am using libcurl in one of my applications to perform HTTP requests. I
> read documentation on how to set options with curl_easy_setopt and found
out
> that those options are "not in any way reset between transfers". So I was
> wondering if there were any way to reset or unset some options so that
they
> are not used in the following tranfers.

Most (if not all) options that take a pointer, accept a NULL as a way to
reset
back to the internal defaults.

Options that take a number don't have any easy ways to revert back to
default.
You need to set them to a value you prefer.

> I encountered problems with the TIMECONDITION that I want to use on some
> transfers but not on every ones. I then set the time value to 0 (Thu, 01
Jan
> 1970 00:00:00) on transfers I did not want to set TIMECONDITION but it
> sounds like an odd way to me.

TIMEVALUE cannot be used to disable TIMEECONDITION. You should however be
able
to set TIMECONDITION to CURL_TIMECOND_NONE to disable the use of time
conditions.

> And now I am looking for a way to unset USERPWD option for transfers that
> dont require autentification. setting USERPWD to "" do prompt me for
> password and I can't allow that in my application...

You're using a too old libcurl! ;-) USERPWD set to NULL in a recent version
will reset it back to internal default: no password, no user.

Previous versions of libcurl had password prompting functionality, but that
was then.

--
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-15