yhirose / cpp-httplib

A C++ header-only HTTP/HTTPS server and client library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to disable session cache in this lib

actualyang opened this issue · comments

httplib::Client cli(host);
httplib::Headers headers = {
{ "Content-Type", "application/json" }
};
auto res = cli.Get(getContent, headers);
if (res.error() != httplib::Error::Success)
{
std::cerr << httplib::to_string(res.error()) << std::endl;
return 12;
}

This is my code. It throw "SSL server verification failed" after the visited website update its certification. If I run wget command the above code can success. I guess the session cache cause this defect. Is there any method to disable the session like (SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF);).

Thanks for the report, but I am not able to give you any meaningful help since there is little information about your environment. Sorry for that...