From 7fa6a3dfb316f71036639b919a4df2ec66c7d778 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 25 Aug 2024 10:00:10 +0200 Subject: [PATCH] Fix bug in partial content serving functionality --- svr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svr.js b/svr.js index d2a6148..f2eee93 100644 --- a/svr.js +++ b/svr.js @@ -3693,11 +3693,11 @@ if (!cluster.isPrimary) { if (req.method != "HEAD") { if (ext == "html" && begin < head.length && (end - begin) < head.length) { - res.writeHead(206, http.STATUS_CODES[206], hdhds); + res.writeHead(206, http.STATUS_CODES[206], rhd); res.end(head.substring(begin, end + 1)); return; } else if (ext == "html" && begin >= head.length + filelen){ - res.writeHead(206, http.STATUS_CODES[206], hdhds); + res.writeHead(206, http.STATUS_CODES[206], rhd); res.end(foot.substring(begin - head.length - filelen, end - head.length - filelen + 1)); return; }