mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-10-25 13:40:03 +00:00
add ssl verify debug logging in a few places
This commit is contained in:
1 file changed
+8
-6
@@ -29,15 +29,17 @@ std::string HTTP::Get(const std::string &IP) {
|
|||||||
std::string Ret;
|
std::string Ret;
|
||||||
|
|
||||||
if(res){
|
if(res){
|
||||||
if(res->status == 200){
|
if (res->status == 200) {
|
||||||
Ret = res->body;
|
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{
|
}else{
|
||||||
if(isDownload) {
|
if(isDownload) {
|
||||||
std::cout << "\n";
|
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;
|
return Ret;
|
||||||
@@ -62,7 +64,7 @@ std::string HTTP::Post(const std::string& IP, const std::string& Fields) {
|
|||||||
}
|
}
|
||||||
Ret = res->body;
|
Ret = res->body;
|
||||||
}else{
|
}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{
|
}else{
|
||||||
httplib::Result res = cli.Post(IP.substr(pos).c_str());
|
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;
|
Ret = res->body;
|
||||||
}else{
|
}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()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user