On Tue, 20 Apr 2021, kent williams via curl-library wrote:
I implemented using the same CURL handle across separate HTTP requests, but
it appears to screw things up in the case where I use it after a PUT, if
I've used CURLOPT_READDATA and CURLOPT_READFUNCTION.
How do I reset those options so that a subsequent GET request doesn't try
and use that put data?
Set CURLOPT_READFUNCTION to NULL to reset it - as mentioned in the man page.
But also, if you reset it to do a GET (with CURLOPT_HTTPGET) it won't use the
read callback anyway.
Also if I set CURLOPT_CUSTOMREQUEST, how do I reset it?
For ordinary PUT you don't need CURLOPT_CUSTOMREQUEST, but you set it to NULL
to reset it. As documented.
--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html