Add response debugging to isolate hanging issue

- 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 <noreply@anthropic.com>
This commit is contained in:
riz 2025-11-20 01:49:22 +00:00
parent e137b1df7f
commit cd3fc84db5
1 changed files with 18 additions and 1 deletions

View File

@ -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;
};