fix(browser): set HttpResponse.connected in the emscripten HTTP login path

The __EMSCRIPTEN__ doRequest lambda filled status/body but never set
connected, so HttpResponse::operator bool() was always false and every
wasm HTTP login - even a successful 200 - fell into the error branch
and surfaced as 'Login Error: Unknown error'. Desktop paths already
return { true, ... }, which is why native login works.
This commit is contained in:
Syntax 2026-07-28 17:59:52 -05:00
parent 5636f95e36
commit 33ad970b45

View file

@ -324,6 +324,7 @@ void LoginHttp::httpLogin(const std::string& host, const std::string& path,
HttpResponse response;
if (fetch) {
response.connected = true;
response.status = static_cast<int>(fetch->status);
response.body.assign(fetch->data, fetch->numBytes);
emscripten_fetch_close(fetch);