From cd3fc84db592c63cf4250b98cd852b408832da07 Mon Sep 17 00:00:00 2001 From: riz Date: Thu, 20 Nov 2025 01:49:22 +0000 Subject: [PATCH] Add response debugging to isolate hanging issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Debug createResponse response object properties - Replace with basic Response object to test if service-srv is the cause - This will help identify if the hang is in createResponse or Bun.serve 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- pkgs/server/serve-web.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pkgs/server/serve-web.ts b/pkgs/server/serve-web.ts index fbfdbee..66ad8c4 100644 --- a/pkgs/server/serve-web.ts +++ b/pkgs/server/serve-web.ts @@ -27,6 +27,23 @@ export const serveWeb = async (arg: { const endTime = Date.now(); console.log(`[DEBUG] createResponse completed in ${endTime - startTime}ms`); + console.log(`[DEBUG] Response object created:`, { + status: response.status, + statusText: response.statusText, + hasHeaders: response.headers ? 'yes' : 'no', + contentType: response.headers?.get('content-type'), + bodyLength: arg.content.length + }); - return response; + // Try returning a basic Response object to isolate the issue + const basicResponse = new Response(arg.content, { + status: 200, + headers: { + 'Content-Type': type || 'text/html', + 'Cache-Control': 'no-cache' + } + }); + + console.log(`[DEBUG] Basic response created, returning...`); + return basicResponse; };