# COMP30023 - Project 2
Project 2 for COMP30023 - Computer Systems.

## Overview
The aim of this project was to be familiar with socket programming, multi-threading, and the HTTP protocol.

The basic implementation of the server involves creating and binding a socket and then waiting for clients to connect. Upon connection, a new socket is created and requests are servered accordingly.

The webroot used in testing can be found under www/.

To test, you should run the server in the background and then make requests using a client of your
choice. Good things to try include web browsers, cURL, and wget. You should do additional testing
beyond what is described in the list below.

For example, you might use the following command to test with cURL:
 curl --http1.0 -v http://127.0.0.1:PORT/PATH

You can test IPv6 like so:
 curl --http1.0 -v http://[::1]:PORT/PATH

The visible tests check the following:

Task 1 (Valid responses)
* get_index: /index.html returns 200.
* get_image: /image.jpg returns 200.
* get_missing: /missing_file.html returns 404.
* get_makefile: /Makefile returns 404.

Task 2 (MIME types)
* mime_index: /index.html returns text/html.
* mime_unknown: /a... returns application/octet-stream.
* mime_image_subdir: /assets/image.jpg returns image/jpeg.
* mime_escape: ../../etc/passwd returns 404.

Task 3 simply repeats previous tests on IPv6.

# Results

=============== START RESULTS TABLE ====================

Task 1: Valid responses (IPv4)              3.925

Task 2: MIME type (IPv4)                    3.750

Task 3: Valid responses & MIME type (IPv6)  .875

Task 4: Concurrency                         3.0

Task 5: Quality of software practices       2

Task 6: Build quality                       1

Project 2 (Total):                          14.55

================ END RESULTS TABLE =====================

Assessor comments:

Excellent, descriptive commit messages

Well modularised

Good, descriptive comments