Download a big enough data using the http protocol.
- curl_multi_add_handle() -> curl_multi_perform() in a loop -> write_callback() is being raised as expected.
- curl_easy is not yet done (no CURLMSG_DONE message), curl_multi_remove_handle() is called. According to the manual:
You can remove handles at any point in time during transfers.
- a) curl_multi_add_handle() -> curl_multi_perform() in a loop -> got CURLMSG_DONE message with the error CURLE_UNSUPPORTED_PROTOCOL.
b) Or curl_easy_perform() returns the error CURLE_UNSUPPORTED_PROTOCOL.
I expected the following
Once removed from the multi handle, you can again use other easy interface functions like curl_easy_perform on the handle or whatever you think is necessary.
Curl_dyn_reset(&data->state.headerb); is not called after curl_multi_add_handle() and data->state.headerb points to the end header mark "\r\n" left after the first request. Thus, curl tries to parse "\r\nHTTP/1.1 200 OK\r\n" when the response on the second request is being processed.
curl/libcurl version
libcurl v7.74.0
operating system
Any