Project 1 for Computer System (COMP30023). A simple static file server with minimum support of HTTP 1.0 written in C.
Name Zijun Chen
Student ID 813190
Login Name zijunc3
git clone git@github.com:CaviarChen/comp30023-2018-project-1.git
cd comp30023-2018-project-1/
make
./server [port number] [path to web root]
Example
./server 8080 ./test/www/
-
Change
#define DEBUG 0
to
#define DEBUG 1
from file "debug_setting.h".
-
Recompile the program using
make
Other than the project requirement, I implemented:
- Thread pool.
- Prevent directory traversal attack.
- Handle problems caused by the client closes the connection unexpectedly.