From 1c6ade62ca6893703a2ded8e5431545f77944d79 Mon Sep 17 00:00:00 2001 From: CEbbinghaus Date: Sun, 2 Apr 2023 00:01:39 +1100 Subject: [PATCH] Added details to response to fix error This change fixes an error I was encountering that complained that the return type was not "application/wasm" --- usdpl-front/scripts/generate_embedded_wasm.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/usdpl-front/scripts/generate_embedded_wasm.py b/usdpl-front/scripts/generate_embedded_wasm.py index d6d6638..c9a3e39 100644 --- a/usdpl-front/scripts/generate_embedded_wasm.py +++ b/usdpl-front/scripts/generate_embedded_wasm.py @@ -25,7 +25,15 @@ function decode() { for (var i = 0; i < binaryString.length; i++) { bytes[i] = binaryString.charCodeAt(i); } - return (async function() {return new Response(bytes.buffer);})(); + return (async function() { + return new Response(bytes.buffer, { + status: 200, + statusText: 'OK', + headers: { + 'Content-Type': 'application/wasm' + } + }); + })(); } export function init_embedded() {