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