Implementation of a simple multi-threaded HTTP/1.0 server that serves files to GET requests. The response statuses that it handles are 200 OK
and 404 Not Found
.
- gcc
- make
- wget
A test script is provided, which would run the server and request for the files in the test
directory. To run the test script:
- Clone this repo and
cd
into it. - Compile the server with
make
. - Make sure
test_script.sh
is executable and run./test_script.sh server any_port_no
whereany_port_no
is any unregistered port number on your machine. - Clean up with
make clobber
.
- Follow steps 1 and 2 from
Running test script
above. - Run
./server port_no path_to_root
whereport_no
is any unregistered port number on your machine, andpath_to_root
is the path to the root directory of your server, e.g../www/
- Check that the server works properly by requesting files (with
wget
or your browser). - When you're done, stop the server with Ctrl+C.
- Clean up with
make clobber
.