curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Curl status code does not match 'last' status when using 102 'Processing' in interim

From: Alex Shaver via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 1 May 2020 12:54:38 -0400

I have a server I connect to that may return one or more 102 'processing'
messages to keep the connection alive while a long processing action is
underway. Supposing the final message is a 200 response, when I check the
curl status code, it returns 102 as the status.

I first noticed this while using pycurl, but I also tested using the curl
command line tool, and got the same result. Fortunately, I can register a
header callback and just manually parse the statuses myself. But this
appears to be a bug as `CURLINFO_RESPONSE_CODE` is documented as returning
the 'last' response code. Granted, the 'last' in that phrase may simply
mean to the most recent 'request/response' process it ran, but it still
feels like it could be improved. Or I may be misusing the tool. Advice on
how to do it correctly would be appreciated, if it is not an error.

Thanks,
Alex

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-01