enable additional file types and add demo files

This commit is contained in:
Nayan
2025-05-08 19:23:06 -04:00
parent 4e8e22ec61
commit e1e4d728b5
6 changed files with 49 additions and 6 deletions

View File

@@ -16,16 +16,13 @@ void response_handle_get(http_request* req, http_response* res) {
if (strcmp(ptr, ".html") == 0) {
response_build_static_file(file_path, HTML, OK, res);
} else if (strcmp(ptr, ".jpg") == 0) {
serve_404(res);
return;
response_build_static_file(file_path, JPG, OK, res);
} else if (strcmp(ptr, ".png") == 0) {
response_build_static_file(file_path, PNG, OK, res);
} else if (strcmp(ptr, ".css") == 0) {
serve_404(res);
return;
response_build_static_file(file_path, CSS, OK, res);
} else if (strcmp(ptr, ".js") == 0) {
serve_404(res);
return;
response_build_static_file(file_path, JS, OK, res);
} else {
serve_404(res);
return;