Skip to content

v1.0.0

Choose a tag to compare

@vimalyad vimalyad released this 09 Oct 07:25
· 3 commits to main since this release

This is the first stable release of the Multi-threaded HTTP Server, a project built from scratch using Java and low-level socket programming.

This version provides a robust and fully functional HTTP/1.1 server capable of handling concurrent client connections, serving static and binary files, processing JSON data, and enforcing essential security measures. The server is packaged as a standalone, executable .jar file, making it easy to run on any machine with Java installed.

Key Features in This Release

  • Multi-threaded Server Core: Implemented a fixed-size thread pool to handle multiple clients simultaneously.
  • HTTP/1.1 Support: Handles GET for file retrieval and POST for data submission.
  • Static & Binary File Serving: Serves .html for in-browser rendering and .png, .jpg, .txt as downloadable files.
  • JSON API Endpoint: Supports POST requests with application/json to create files in the uploads/ directory.
  • Connection Management: Supports persistent keep-alive connections with idle timeouts and request limits.
  • Security Hardening: Includes Path Traversal protection and Host header validation.
  • Comprehensive Logging: Logs all major server events to server.log.

Assets

  • 📦 http_server.jar: The executable "uber" JAR file. It contains the compiled server code and all necessary dependencies.

How to Run

  1. Download the myartifactid-0.0-SNAPSHOT.jar file from the assets below.
  2. Open your terminal or command prompt and navigate to the directory where you downloaded the file.
  3. Run the server using one of the following commands:

With default settings (localhost:8080, 10 threads):

java -jar http_server.jar

With custom settings (e.g., port 8000, any host, 20 threads):

java -jar http_server.jar 8000 0.0.0.0 20