Skip to content

CaviarChen/comp30023-2018-project-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A simple static file server with minimum support of HTTP 1.0 written in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published