> 2007/11/20, Romanus, Emil
> 2007/11/20, McGarvey, Kevin <kmcGarvey_at_verisign.com>:
> > but this doesn't:
> > curl_rc = curl_easy_setopt(clntPtr_, CURLOPT_POSTFIELDSIZE, 0);
> > curl_rc = curl_easy_setopt(clntPtr_, CURLOPT_POSTFIELDS, NULL);
> Very strange. Because as I remember it, that was *the*
> solution for a problem I had before the documentation was
> updated with this info. It solved my problem when doing a
> no-content post. My case involved doing multiple POST and GET
> requests in a row using the same handle, then finally a
> no-content POST request.
> What libcurl version do you have?
> > Setting CURLOPT_POSTFIELDS to NULL causes the subsequent
> post request
> > to block
> That's the exact issue I had, we solved it here on the
> mailing list and Daniel added the notice in the
> documentation. The solution, which worked for me, was to set
> CURLOPT_POSTFIELDSIZE to 0.
That is part of the solution that worked for us, but we also had to set
CURLOPT_POSTFIELDS to a valid char pointer. We did this by passing "".
Passing NULL or omitting the line that sets CURLOPT_POSTFIELDS (which it
seems you should be able to do if you set CURLOPT_POSTFIELDSIZE to 0)
caused it to block.
> Emil Romanus
Received on 2007-11-21