curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: A string issue that after received the http 204, the curl_formadd function seems couldn't work again

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 17 Jan 2017 03:03:30 -0500

On 1/16/2017 8:34 PM, 杨俊 wrote:
> Add more information.
> After I got the 204 response, then I do POST again.
> It seems the code didn't do the callback function of readFileFunc.
> So it didn't upload the message and I'll get the NG result.
> If I got the 200 response, then I do POST again.
> It can do callback function of readFileFunc.
> Then the result is OK.
>
> Which I want is that I need re-use the curl_handle.
> But now, it seems if I got the 204, I can't use the same curl_handle
> again.
> Is my code wrong?

Are you using the latest libcurl? Please give the curl_version() output.
Also the code you provided is a lot and not self-contained. We need the
bare minimum amount of code to reproduce the problem, preferably
self-contained.

I tried repeated formposts with 204 replies in the latest libcurl and
everything appeared to function normally, but I did not use your code to
do it since it's missing pieces.

curl 7.52.2-DEV (i386-pc-win32) libcurl/7.53.0-DEV OpenSSL/1.0.2j
nghttp2/1.18.1

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-01-17