mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 23:46:59 +00:00
add ssl verify debug logging in a few places
This commit is contained in:
parent
c8a1b77a54
commit
cc42a5e0ab
@ -29,15 +29,17 @@ std::string HTTP::Get(const std::string &IP) {
|
||||
std::string Ret;
|
||||
|
||||
if(res){
|
||||
if(res->status == 200){
|
||||
if (res->status == 200) {
|
||||
Ret = res->body;
|
||||
}else error(res->reason);
|
||||
|
||||
}
|
||||
else {
|
||||
error("Failed to GET '" + IP + "': " + res->reason + ", ssl verify = " + std::to_string(cli.get_openssl_verify_result()));
|
||||
}
|
||||
}else{
|
||||
if(isDownload) {
|
||||
std::cout << "\n";
|
||||
}
|
||||
error("HTTP Get failed on " + to_string(res.error()));
|
||||
error("HTTP Get failed on " + to_string(res.error()) + ", ssl verify = " + std::to_string(cli.get_openssl_verify_result()));
|
||||
}
|
||||
|
||||
return Ret;
|
||||
@ -62,7 +64,7 @@ std::string HTTP::Post(const std::string& IP, const std::string& Fields) {
|
||||
}
|
||||
Ret = res->body;
|
||||
}else{
|
||||
error("HTTP Post failed on " + to_string(res.error()));
|
||||
error("HTTP Post failed on " + to_string(res.error()) + ", ssl verify = " + std::to_string(cli.get_openssl_verify_result()));
|
||||
}
|
||||
}else{
|
||||
httplib::Result res = cli.Post(IP.substr(pos).c_str());
|
||||
@ -72,7 +74,7 @@ std::string HTTP::Post(const std::string& IP, const std::string& Fields) {
|
||||
}
|
||||
Ret = res->body;
|
||||
}else{
|
||||
error("HTTP Post failed on " + to_string(res.error()));
|
||||
error("HTTP Post failed on " + to_string(res.error()) + ", ssl verify = " + std::to_string(cli.get_openssl_verify_result()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user