summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/bcat/backend/boxcat.cpp7
-rw-r--r--src/web_service/web_backend.cpp7
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp
index 67e39a5c4..f589864ee 100644
--- a/src/core/hle/service/bcat/backend/boxcat.cpp
+++ b/src/core/hle/service/bcat/backend/boxcat.cpp
@@ -200,7 +200,8 @@ private:
200 DownloadResult DownloadInternal(const std::string& resolved_path, u32 timeout_seconds, 200 DownloadResult DownloadInternal(const std::string& resolved_path, u32 timeout_seconds,
201 const std::string& content_type_name) { 201 const std::string& content_type_name) {
202 if (client == nullptr) { 202 if (client == nullptr) {
203 client = std::make_unique<httplib::SSLClient>(BOXCAT_HOSTNAME, PORT, timeout_seconds); 203 client = std::make_unique<httplib::SSLClient>(BOXCAT_HOSTNAME, PORT);
204 client->set_timeout_sec(timeout_seconds);
204 } 205 }
205 206
206 httplib::Headers headers{ 207 httplib::Headers headers{
@@ -448,8 +449,8 @@ std::optional<std::vector<u8>> Boxcat::GetLaunchParameter(TitleIDVersion title)
448 449
449Boxcat::StatusResult Boxcat::GetStatus(std::optional<std::string>& global, 450Boxcat::StatusResult Boxcat::GetStatus(std::optional<std::string>& global,
450 std::map<std::string, EventStatus>& games) { 451 std::map<std::string, EventStatus>& games) {
451 httplib::SSLClient client{BOXCAT_HOSTNAME, static_cast<int>(PORT), 452 httplib::SSLClient client{BOXCAT_HOSTNAME, static_cast<int>(PORT)};
452 static_cast<int>(TIMEOUT_SECONDS)}; 453 client.set_timeout_sec(static_cast<int>(TIMEOUT_SECONDS));
453 454
454 httplib::Headers headers{ 455 httplib::Headers headers{
455 {std::string("Game-Assets-API-Version"), std::string(BOXCAT_API_VERSION)}, 456 {std::string("Game-Assets-API-Version"), std::string(BOXCAT_API_VERSION)},
diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp
index 6683f459f..737ffe409 100644
--- a/src/web_service/web_backend.cpp
+++ b/src/web_service/web_backend.cpp
@@ -73,14 +73,12 @@ struct Client::Impl {
73 if (!parsedUrl.GetPort(&port)) { 73 if (!parsedUrl.GetPort(&port)) {
74 port = HTTP_PORT; 74 port = HTTP_PORT;
75 } 75 }
76 cli = std::make_unique<httplib::Client>(parsedUrl.m_Host.c_str(), port, 76 cli = std::make_unique<httplib::Client>(parsedUrl.m_Host.c_str(), port);
77 TIMEOUT_SECONDS);
78 } else if (parsedUrl.m_Scheme == "https") { 77 } else if (parsedUrl.m_Scheme == "https") {
79 if (!parsedUrl.GetPort(&port)) { 78 if (!parsedUrl.GetPort(&port)) {
80 port = HTTPS_PORT; 79 port = HTTPS_PORT;
81 } 80 }
82 cli = std::make_unique<httplib::SSLClient>(parsedUrl.m_Host.c_str(), port, 81 cli = std::make_unique<httplib::SSLClient>(parsedUrl.m_Host.c_str(), port);
83 TIMEOUT_SECONDS);
84 } else { 82 } else {
85 LOG_ERROR(WebService, "Bad URL scheme {}", parsedUrl.m_Scheme); 83 LOG_ERROR(WebService, "Bad URL scheme {}", parsedUrl.m_Scheme);
86 return Common::WebResult{Common::WebResult::Code::InvalidURL, "Bad URL scheme"}; 84 return Common::WebResult{Common::WebResult::Code::InvalidURL, "Bad URL scheme"};
@@ -90,6 +88,7 @@ struct Client::Impl {
90 LOG_ERROR(WebService, "Invalid URL {}", host + path); 88 LOG_ERROR(WebService, "Invalid URL {}", host + path);
91 return Common::WebResult{Common::WebResult::Code::InvalidURL, "Invalid URL"}; 89 return Common::WebResult{Common::WebResult::Code::InvalidURL, "Invalid URL"};
92 } 90 }
91 cli->set_timeout_sec(TIMEOUT_SECONDS);
93 92
94 httplib::Headers params; 93 httplib::Headers params;
95 if (!jwt.empty()) { 94 if (!jwt.empty()) {