Closed
Description
I did this
I'm calling curl_easy_nextheader
in a loop to count the number of requests in the previous transfer. This works until a transfer involves HTTP redirection. After the redirected request completes, curl_easy_nextheader
will work as expected. However, on all subsequent requests curl_easy_nextheader
will return null if the request
parameter is greater than -1.
I expected the following
That curl_easy_nextheader
would not be affected by previous transfers.
curl/libcurl version
libcurl/7.85.0 OpenSSL/3.0.5 (Schannel) zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.3 libssh2/1.10.0 nghttp2/1.49.0 ngtcp2/0.8.0 nghttp3/0.7.0 libgsasl/1.10.0
operating system
Windows 10 build 19044.1889
Activity
bagder commentedon Sep 4, 2022
Thanks a lot for your report!
Do you perhaps have a small stand-alone program we can run from our ends against a public URL to trigger the problem?
charonn0 commentedon Sep 7, 2022
My knowledge of C is limited, but I cobbled together something. I get linker errors when I try to run it, so I'm not 100% sure it's correct.
bagder commentedon Sep 7, 2022
Excellent, I can reproduce what you have reported with this.
header: define public API functions as extern c
headers: reset the requests counter at transfer start
header: define public API functions as extern c
headers: reset the requests counter at transfer start
1 remaining item