summaryrefslogtreecommitdiff
path: root/ext/flash/01_http.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/flash/01_http.js')
-rw-r--r--ext/flash/01_http.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/flash/01_http.js b/ext/flash/01_http.js
index 34b158e40..5152fd9e5 100644
--- a/ext/flash/01_http.js
+++ b/ext/flash/01_http.js
@@ -316,11 +316,13 @@ async function handleResponse(
respBody,
length,
);
+ // A HEAD request always ignores body, but includes the correct content-length size.
+ const responseLen = method === 1 ? core.byteLength(responseStr) : length;
writeFixedResponse(
serverId,
i,
responseStr,
- length,
+ responseLen,
!ws, // Don't close socket if there is a deferred websocket upgrade.
respondFast,
);