Skip to content

Commit

Permalink
Print to the log if cURL has cookie support disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
rollerozxa committed Jul 12, 2024
1 parent 939a25d commit 489ee15
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/src/network.cc
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,12 @@ init_curl_defaults(void *curl)

curl_easy_setopt(P.curl, CURLOPT_HEADERFUNCTION, _parse_headers);

curl_easy_setopt(P.curl, CURLOPT_COOKIEFILE, cookie_file);
CURLcode res = curl_easy_setopt(P.curl, CURLOPT_COOKIEFILE, cookie_file);

if (res != CURLE_OK) {
tms_errorf("!!! curl is not compiled with cookie support !!!");
}

curl_easy_setopt(P.curl, CURLOPT_COOKIEJAR, cookie_file);

curl_easy_setopt(P.curl, CURLOPT_XFERINFOFUNCTION, progress_cb);
Expand Down

0 comments on commit 489ee15

Please sign in to comment.