-
Notifications
You must be signed in to change notification settings - Fork 937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpr::Post wrong content length #450
Comments
@bayec, which version of TEST(UrlEncodedPostTests, TimeoutPostTest) {
Url url{server->GetBaseUrl() + "/json_post.html"};
std::string body{"{\"RegisterObject\": {\"DeviceID\": \"65010000005030000001\"}}"};
cpr::Response response =
cpr::Post(url, cpr::Header{{"Content-Type", "application/json"}}, cpr::Body{body},
cpr::ConnectTimeout{3000}, cpr::Timeout{3000});
std::string expected_text{"{\"RegisterObject\": {\"DeviceID\": \"65010000005030000001\"}}"};
EXPECT_EQ(expected_text, response.text);
EXPECT_EQ(url, response.url);
EXPECT_EQ(std::string{"application/json"}, response.header["content-type"]);
EXPECT_EQ(201, response.status_code);
EXPECT_EQ(ErrorCode::OK, response.error.code);
} |
@COM8 |
AH! Setting curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE_LARGE, curl_off_t size); |
I've pushed a potential fix for this issue. |
This fixes LibertyM Steam verification.
I have a similar question. Here's the code I wrote. Run it, I found some problems by Wireshark.
Content-Length
is 240518168632, andExpect
is 100-continue. Please help me, thanks.Originally posted by @bayec in #449 (comment)
The text was updated successfully, but these errors were encountered: