1
0
mirror of https://github.com/fumiama/simple-http-server.git synced 2026-06-05 00:30:23 +08:00

add hostname check

This commit is contained in:
源文雨
2023-03-11 00:01:00 +08:00
parent a9d7b8e38a
commit 3f6bb7d384
2 changed files with 41 additions and 17 deletions

View File

@@ -22,6 +22,7 @@ A necessary subset of `HTTP 1.0` with following options of request header being
### Code
- 200 OK
- 400 BAD REQUEST
- 403 Forbidden
- 404 NOT FOUND
- 500 Internal Server Error
- 501 Method Not Implemented
@@ -46,12 +47,14 @@ make install
## Command line usage
```bash
simple-http-server [-h] [-d] [-p <port|unix socket path>] [-r <rootdir>] [-u <uid>]
simple-http-server [-d] [-h] [-n host.name.com:port] [-p <port|unix socket path>] [-q 16] [-r <rootdir>] [-u <uid>]
```
- **-h**: display this help.
- **-d**: run as daemon.
- **-h**: display this help.
- **-n**: check hostname and port.
- **-p**: if not set, we will choose a random port.
- **-q**: listen queue length (defalut is 16).
- **-r**: http root dir.
- **-u**: run as this uid.