2 Commits

Author SHA1 Message Date
xfy911
250f336eff fix(build): 修复编译错误与警告
- Makefile: 添加 -luring 链接(coco 内部使用 io_uring)
- static.c: 添加 #include <time.h> 和 _GNU_SOURCE 定义
- http.h: 添加 #include <stddef.h> 修复 size_t 未定义
- server.c: 删除未使用的 conn_write,修复 root_dir 传递
2026-06-03 16:55:48 +08:00
xfy911
d7b9c93e78 feat(static): 实现静态资源服务模块
- static_serve_file: 文件服务(sendfile 零拷贝 + Range 支持)
- static_serve_directory: 目录浏览(HTML 列表 + 文件大小/时间)
- static_send_error: HTTP 错误响应(400/403/404/416/500)
- safe_path_join: 路径遍历防护
2026-06-03 16:45:48 +08:00