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

调整排版

This commit is contained in:
源文雨
2021-08-14 21:00:02 +08:00
parent 4e8c742c13
commit 2721743169

View File

@@ -1,5 +1,5 @@
<div align="center"> <div align="center">
<img src=".github/shinsako.jpg" width = "400" height = "400" alt="Shinsako"><br> <img src=".github/shinsako.jpg" width = "360" height = "360" alt="Shinsako"><br>
<h1>simple-http-server</h1> <h1>simple-http-server</h1>
A variant of Tinyhttpd.<br><br> A variant of Tinyhttpd.<br><br>
</div> </div>
@@ -8,7 +8,7 @@
> >
> Modified June 2021 by Fumiama(源文雨) > Modified June 2021 by Fumiama(源文雨)
# Protocol ## Protocol
A necessary subset of `HTTP 1.0` with following options of request header being supported. A necessary subset of `HTTP 1.0` with following options of request header being supported.
### From client ### From client
@@ -26,13 +26,13 @@ A necessary subset of `HTTP 1.0` with following options of request header being
- 500 Internal Server Error - 500 Internal Server Error
- 501 Method Not Implemented - 501 Method Not Implemented
# Features ## Features
1. Serve files 1. Serve files
2. CGI 2. CGI
3. Listen on `ipv6` 3. Listen on `ipv6`
4. Multi-thread 4. Multi-thread
# Compile ## Compile
```bash ```bash
git clone https://github.com/fumiama/simple-http-server.git git clone https://github.com/fumiama/simple-http-server.git
cd simple-http-server cd simple-http-server
@@ -43,7 +43,7 @@ make
make install make install
``` ```
# Command line usage ## Command line usage
```bash ```bash
simple-http-server [-d] [-p <port>] [-r <rootdir>] [-u <uid>] simple-http-server [-d] [-p <port>] [-r <rootdir>] [-u <uid>]
``` ```
@@ -53,7 +53,7 @@ simple-http-server [-d] [-p <port>] [-r <rootdir>] [-u <uid>]
- **-r**: http root dir. - **-r**: http root dir.
- **-u**: run as this uid. - **-u**: run as this uid.
# CGI usage ## CGI usage
When you put an executable file into the web path, the server will call `execl` to run it while passing 3 parameters as below When you put an executable file into the web path, the server will call `execl` to run it while passing 3 parameters as below
```c ```c