From 97ca6036fa5dc1e73b27115304d8d435b9fc7df6 Mon Sep 17 00:00:00 2001 From: Jim Broadbent Date: Sun, 20 Oct 2024 17:23:15 +0100 Subject: [PATCH] LibWeb/XHR: Progess event handle empty length --- Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp index 1eca7177ccb..643507894d2 100644 --- a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp +++ b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp @@ -106,7 +106,7 @@ static void fire_progress_event(XMLHttpRequestEventTarget& target, FlyString con // with the loaded attribute initialized to transmitted, and if length is not 0, with the lengthComputable attribute initialized to true // and the total attribute initialized to length. ProgressEventInit event_init {}; - event_init.length_computable = true; + event_init.length_computable = length; event_init.loaded = transmitted; event_init.total = length; // FIXME: If we're in an async context, this will propagate to a callback context which can't propagate it anywhere else and does not expect this to fail.