mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-19 11:19:36 +00:00
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.
This commit is contained in:
1 parent
7234944098
commit
7220bdb8b2
1 file changed
+1
-1
+1
-1
@@ -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<char> buffer;
|
||||
|
||||
Reference in new issue
Block a user