Add RequestContext primitive (todo §0); harden static serving (HEAD, control-char, stream-error logging)

This commit is contained in:
2026-06-14 19:33:17 +02:00
parent b4c149db27
commit c544387d3a
12 changed files with 158 additions and 34 deletions

View File

@@ -28,7 +28,7 @@ export function createApp(options: AppOptions = {}): Server {
const { pathname } = new URL(req.url ?? "/", "http://localhost");
if (pathname.startsWith("/public/")) {
await serveStatic(publicDir, pathname.slice("/public/".length), res);
await serveStatic(publicDir, pathname.slice("/public/".length), res, req.method === "HEAD");
return;
}