File tree Expand file tree Collapse file tree 3 files changed +2
-6
lines changed
Expand file tree Collapse file tree 3 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 11#include " cpr/curlholder.h"
2+ #include " cpr/secure_string.h"
23#include < cassert>
34#include < curl/curl.h>
45#include < curl/easy.h>
56#include < string_view>
6- #include " cpr/secure_string.h"
77
88namespace cpr {
99CurlHolder::CurlHolder () {
Original file line number Diff line number Diff line change @@ -273,10 +273,7 @@ const Content& Session::GetContent() const {
273273}
274274
275275void Session::RemoveContent () {
276- if (std::holds_alternative<cpr::Payload>(content_)) {
277- curl_easy_setopt (curl_->handle , CURLOPT_POSTFIELDSIZE_LARGE, -1 );
278- curl_easy_setopt (curl_->handle , CURLOPT_COPYPOSTFIELDS, NULL );
279- } else if (std::holds_alternative<cpr::Body>(content_)) {
276+ if (std::holds_alternative<cpr::Payload>(content_) || std::holds_alternative<cpr::Body>(content_)) {
280277 curl_easy_setopt (curl_->handle , CURLOPT_POSTFIELDSIZE_LARGE, -1 );
281278 curl_easy_setopt (curl_->handle , CURLOPT_COPYPOSTFIELDS, NULL );
282279 } else if (std::holds_alternative<cpr::Multipart>(content_)) {
Original file line number Diff line number Diff line change 33#include < cstdint>
44#include < cstdlib>
55#include < gtest/gtest.h>
6- #include < span>
76
87#include < stdexcept>
98#include < string>
You can’t perform that action at this time.
0 commit comments