fix(qbzd): QConnect form-encoded createToken + mDNS hostname + response parsing
3 fixes: 1. qws/createToken needs form body (jwt=jwt_qws, user_auth_token_needed, strong_auth_needed) not empty body. Was getting 400 Bad Request. 2. mDNS hostname must end with '.local.' for service registration. 3. Response parsing: jwt_qws.endpoint + jwt_qws.jwt, not tokens array. All 3 patterns copied from working desktop implementation in qconnect_service.rs. cc
This commit is contained in:
2 files changed
+9
-10
No files matched your search
@@ -265,7 +265,7 @@ fn register_mdns(config: &DaemonConfig) -> Result<mdns_sd::ServiceDaemon, String
|
||||
let service_info = mdns_sd::ServiceInfo::new(
|
||||
"_qbz._tcp.local.",
|
||||
&service_name,
|
||||
&format!("{}.", hostname::get().ok().and_then(|h| h.into_string().ok()).unwrap_or_else(|| "localhost".to_string())),
|
||||
&format!("{}.local.", hostname::get().ok().and_then(|h| h.into_string().ok()).unwrap_or_else(|| "localhost".to_string())),
|
||||
"",
|
||||
config.server.port,
|
||||
None,
|
||||
|
||||
Reference in new issue
Block a user