From 7220bdb8b2f23e04e763953c903a1a844d7dd26d Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 18 Oct 2026 07:44:30 -0400 Subject: [PATCH] Pass the read state to curl by address in the Expect test CURLOPT_READDATA takes a pointer, but ServerClosesConnection passed the read_data struct itself through curl_easy_setopt()'s varargs, so the read callback never got its state and never produced a body. --- test/test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.cc b/test/test.cc index 4149ff51..2f16078b 100644 --- a/test/test.cc +++ b/test/test.cc @@ -21202,7 +21202,7 @@ TEST(Expect100ContinueTest, ServerClosesConnection) { d->read_size += size * nmemb; return size * nmemb; }; - curl_easy_setopt(curl.get(), CURLOPT_READDATA, data); + curl_easy_setopt(curl.get(), CURLOPT_READDATA, &data); curl_easy_setopt(curl.get(), CURLOPT_READFUNCTION, read_callback); std::vector buffer;