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_multi - Reading response headers before reading the whole response body

From: Idan Freiberg via curl-library <curl-library_at_cool.haxx.se>
Date: Sat, 6 Feb 2021 08:22:53 +0200

Hi curl developers,

I'm using the multi-stack interface in order to read a large response body
in chunk, with the help of the CURLOPT_WRITEFUNCTION and some code
similar to the one in fcurl project.

I wonder if its possible to fetch info like response code, cookies,
response headers before the running easy handle is done (which means all
the response body was read).

Technically reading the response headers should be possible as they are the
first thing received. The thing is i'm not sure how to check they are fully
received after a curl_multi_perform() call?
Some times when using HTTP auth, you will receive the subsequent 401
response code instead of the actual response code returns after
authentication.

Any suggestions?

Thanks

-- 
Idan Freiberg
Mobile: +972-52-2925213


-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-02-06