From be18c58306708b88d6d32535f0872aa25b9120b6 Mon Sep 17 00:00:00 2001 From: Daniel Lamando Date: Sat, 18 May 2024 15:59:12 +0200 Subject: [PATCH] Try restoring partial response body --- feat/dependencies-of/api.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/feat/dependencies-of/api.ts b/feat/dependencies-of/api.ts index 15ed286..eb6aa6c 100644 --- a/feat/dependencies-of/api.ts +++ b/feat/dependencies-of/api.ts @@ -152,6 +152,12 @@ async function serveHtmlGraphPage(req: Request, modUrl: string, modSlug: string, yield pageHtml; + // Deno's response compression buffers our loading message + // Instead of defeating compression, we send a few bytes of junk. + for (let i = 0; i < 16; i++) { + yield new Array(1024).fill(' ').join(''); + } + yield "\n