fix: error

This commit is contained in:
2025-04-08 00:48:05 +08:00
parent 3b32ba7244
commit c9a3f7fda9
2 changed files with 2 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ async function getTextFromStream(stream: Readable | IncomingMessage): Promise<st
export async function getTextFromStreamAndAddStat(stream: Readable | IncomingMessage): Promise<{ html: string; contentLength: number }> {
const html = await getTextFromStream(stream);
const newHtml = addStat(html);
const newContentLength = newHtml.length;
const newContentLength = Buffer.byteLength(newHtml);
return { html: newHtml, contentLength: newContentLength };
}
export const httpProxy = async (