This project is a multi-threaded HTTP/1.1 server that serves clients over TCP. It supports various features, including handling GET and POST requests, parsing headers, and responding with appropriate status codes.
-
Start the Server: Begin by launching the server on port 4221.
./your_server.sh
-
Accepting Connections: The server accepts TCP connections and responds with a 200 OK status.
-
Handling Errors: In case of an error, the server gracefully responds with a 404 NOT FOUND status.
The server effectively processes GET requests and serves content accordingly.
Parsed headers, extracting and printing the user-agent
information.
Implemented multi-threading to handle multiple clients concurrently.
Utilize GET requests with the --directory <directory-path>
argument to view the contents of a specified directory.
Leverage POST requests to save files in the directory of the web server. The server responds with a 201 OK status upon successful file creation.