mirror of
https://git.citron-emu.org/citron/emulator
synced 2026-01-07 10:23:53 +00:00
fix: Multiplayer network fixes and airplane mode
- Auto-select network interface for direct connect/host room - Always recreate ENet client on join for fresh bindings - Add airplane mode toggle (Desktop & Android) - Fix JWT verification with empty verify_uid - Improve content-type handling for JWT endpoints Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -138,7 +138,15 @@ struct Client::Impl {
|
||||
return WebResult{WebResult::Code::WrongContent, "", ""};
|
||||
}
|
||||
|
||||
if (content_type->second.find(accept) == std::string::npos) {
|
||||
// For GetExternalJWT, be more lenient with content-type to handle error responses
|
||||
// The API may return text/plain for errors, but we still want to process the response
|
||||
bool content_type_valid = content_type->second.find(accept) != std::string::npos;
|
||||
if (!content_type_valid && accept == "text/html") {
|
||||
// Also accept text/plain for JWT endpoints (error responses)
|
||||
content_type_valid = content_type->second.find("text/plain") != std::string::npos;
|
||||
}
|
||||
|
||||
if (!content_type_valid) {
|
||||
LOG_ERROR(WebService, "{} to {} returned wrong content: {}", method, host + path,
|
||||
content_type->second);
|
||||
return WebResult{WebResult::Code::WrongContent, "Wrong content", ""};
|
||||
|
||||
Reference in New Issue
Block a user