cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HEAD request with POST data

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 30 Jun 2004 09:03:21 +0200 (CEST)

On Tue, 29 Jun 2004, Casey ODonnell wrote:

> once you've made several setopt() calls, you've made it hard on yourself to
> get the handle back to normal.

...

> My guess (it's a guess, based off my experience with other calls having
> similar issues):
>
> curl_easy_setopt(pCURL, CURLOPT_POST, FALSE);
> curl_easy_setopt(pCURL, CURLOPT_POSTFIELDS, NULL);
> curl_easy_setopt(pCURL, CURLOPT_POSTFIELDSIZE, 0);
>
> curl_easy_setopt(pCURL, CULROPT_NOBODY, TRUE);
>
> That would be a guess. Don't know if I'm right.

I would guess so too. Having 120 available options makes it hard to remember
all details about every combination... :-O

> I have not looked at the underlying structure of the CURL* handle, but would
> it be possible to have a function that allows us to re-init the CURL* handle
> without cleaning it up? This would make performing multiple heterogeneous
> calls much simpler.

> Just an idea...then again, perhaps I could look into it.
>
> curl_easy_reset(CURL* pCURL);

I think it could be very useful indeed. Feel free to jump in and have a go at
it!

Still, Niels van Tongeren's issue should be looked into anyway since such a
*_reset() function would only be one option, restoring the options manually
will continue to be another available option.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-06-30