1
Fork 0

remove debug logging

This commit is contained in:
Jan-Erik Rediger 2024-06-01 16:33:35 +02:00
parent 341d395197
commit 9bb9d6dc82

View file

@ -116,7 +116,6 @@ export fn handle_file(buf: *memio::stream, serv_req: *http::server_request) void
let ext = path::peek_ext(&p);
if (ext is void) {
fmt::printfln("can't find ext. bye.")!;
handle_notfound(buf, serv_req);
return;
};
@ -126,13 +125,11 @@ export fn handle_file(buf: *memio::stream, serv_req: *http::server_request) void
case "css" => yield "text/css";
case "js" => yield "application/javascript; charset=utf-8";
case =>
fmt::printfln("unknown ext: {}", ext)!;
handle_notfound(buf, serv_req);
return;
};
let filename = path::basename(request.target.path);
fmt::printfln("filename: {}", filename)!;
let fp = os::open(filename)!;
defer io::close(fp)!;
let filecontent = io::drain(fp)!;