mirror of
https://github.com/mehah/otclient
synced 2026-08-15 16:29:06 -04:00
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:
parent
5636f95e36
commit
33ad970b45
1 changed files with 1 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue