## Servette
计网实验:使用C语言实现http服务器
目标功能:
- [x] 支持HTTP post 方法,可以上传文件 完成时间:11.19
- [x] 支持HTTP get 方法,可以下载文件 完成时间:11.19
- [ ] 支持配置文件 预计完成时间:12.11
- [x] 支持CGI 显示文件列表 完成时间:11.24
- [x] 支持pthread多线程 完成时间:11.24
- [x] 支持HTTP分块传输 完成时间:11.27
- [x] 支持HTTP持久连接 完成时间:12.4
- [ ] 支持管道 预计完成时间:null
- [x] 使用openssl库,支持HTTPS 预计完成时间:12.10
- [x] 使用libevent支持多路并发 完成时间:12.9
- [x] 测试和改bug 预计完成时间: 12.9
- [x] 实验报告编写 预计完成时间:12.13
### 构建
```
git clone https://github.com/jiangph1001/Servette.git && cd Servette
make
```
### 启动
```
./servette
```
访问
[ip]:8080
**注意:**
建议使用root用户启动进程!
如果真的无法使用root用户也没关系,影响就是启动页无法一键跳转到管理文件的界面,需要手动输入url
### 使用
启动后目前默认加载`index.html`
- html文件读取目录:`www/`
- 文件下载API:`/?download=[文件名] `
- CGI功能入口:`/?cgi-bin=[文件目录]`
- 默认为读取用户目录(即root用户读取`/root`, 普通用户读取`/home/[用户名]`)
- 端口号通过`config.h`修改,修改后需要重新编译(后续通过配置文件读取)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
UCAS计算机网络课程实验-C语言实现http服务器-内含源码和说明书(可自己修改).zip (43个子文件)
.vscode
settings.json 106B
tasks.json 451B
launch.json 1013B
Makefile 413B
src
servette_event_bf.c 18KB
servette_event.c 9KB
http_header_utils.h 6KB
servette.c 3KB
servette.conf 55B
header.h 6KB
config.h 336B
response.h 19KB
urldecode.h 2KB
kmp.h 1KB
tester.c 2KB
filemanage.h 1KB
www
style.css 5KB
test_event.html 12KB
js
bootstrap.min.js 36KB
jquery.countdown.min.js 3KB
css
bootstrap.min.css 120KB
font-awesome.min.css 9KB
favicon.ico 66KB
index.html 3KB
github.jpg 10KB
test.txt 7KB
err.html 3KB
images
bg.jpg 109KB
fonts
FontAwesome.otf 92KB
glyphicons-halflings-regular.svg 106KB
glyphicons-halflings-regular.ttf 44KB
glyphicons-halflings-regular.woff 23KB
glyphicons-halflings-regular.eot 20KB
fontawesome-webfont.eot 59KB
glyphicons-halflings-regular.woff2 18KB
fontawesome-webfont.woff 70KB
fontawesome-webfont.woff2 55KB
fontawesome-webfont.svg 306KB
fontawesome-webfont.ttf 119KB
cgi-bin
filelist 13KB
filelist.c 6KB
filelist.py 3KB
README.md 1KB
共 43 条
- 1
资源评论
小码蚁.
- 粉丝: 2664
- 资源: 4483
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功