This project implements a basic HTTP server in Java, following the stages outlined in the CodeCrafters HTTP server course (https://app.codecrafters.io/courses/http-server).
- Handles GET and POST requests
- Supports file serving and creation
- Implements content encoding (currently gzip)
- Handles multiple concurrent connections using a thread pool
- Validates HTTP requests and headers
- Provides appropriate error responses for invalid requests
WebServer
: The main class that initializes the server and manages incoming connections.ClientHandler
: Handles individual client connections and processes HTTP requests.RequestHandler
: Parses and validates HTTP requests, routing them to appropriate handlers.ResponseWriter
: Generates and sends HTTP responses.FileHandler
: Manages file-related operations (serving and creating files).ContentEncoder
: Handles content encoding (e.g., gzip compression) for responses.
- Compile the Java files.
- Run the
WebServer
class. - The server will start on port 8080 by default.