Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 826 Bytes

README.md

File metadata and controls

40 lines (28 loc) · 826 Bytes

Simple HTTP 1.0 Server

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


Installation

git clone git@github.com:CaviarChen/comp30023-2018-project-1.git
cd comp30023-2018-project-1/
make

Usage

 ./server [port number] [path to web root]

Example

./server 8080 ./test/www/

Debug Mode

  1. Change

     #define DEBUG 0    
    

    to

     #define DEBUG 1
    

    from file "debug_setting.h".

  2. Recompile the program using

     make
    

Extra Work

Other than the project requirement, I implemented:

  • Thread pool.
  • Prevent directory traversal attack.
  • Handle problems caused by the client closes the connection unexpectedly.