summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Fetch
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Fetch')
-rw-r--r--Userland/Libraries/LibWeb/Fetch/BodyInit.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp b/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp
index 8b94dd38bc..076711867f 100644
--- a/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp
+++ b/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp
@@ -117,6 +117,10 @@ WebIDL::ExceptionOr<Infrastructure::BodyWithType> extract_body(JS::Realm& realm,
}));
// FIXME: 11. If source is a byte sequence, then set action to a step that returns source and length to source’s length.
+ // For now, do it synchronously.
+ if (source.has<ByteBuffer>())
+ length = source.get<ByteBuffer>().size();
+
// FIXME: 12. If action is non-null, then run these steps in parallel:
// 13. Let body be a body whose stream is stream, source is source, and length is length.