xfy911
|
413288d837
|
feat(http): 添加缓存头部解析 + 修复编译警告
- http: 解析 If-None-Match 和 If-Modified-Since 请求头
- http: 响应结构体添加 etag 和 last_modified 字段
- server/static: 替换 strncpy 为 snprintf,消除 stringop-truncation 警告
- static: 修复 CSS 百分号转义(%%)
- static: 消除 unused parameter 警告
|
2026-06-03 17:30:37 +08:00 |
|
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 |
|