v1.0.0
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
GETfor file retrieval andPOSTfor data submission. - ✅ Static & Binary File Serving: Serves
.htmlfor in-browser rendering and.png,.jpg,.txtas downloadable files. - ✅ JSON API Endpoint: Supports
POSTrequests withapplication/jsonto create files in theuploads/directory. - ✅ Connection Management: Supports persistent
keep-aliveconnections 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
- Download the
myartifactid-0.0-SNAPSHOT.jarfile from the assets below. - Open your terminal or command prompt and navigate to the directory where you downloaded the file.
- Run the server using one of the following commands:
With default settings (localhost:8080, 10 threads):
java -jar http_server.jarWith custom settings (e.g., port 8000, any host, 20 threads):
java -jar http_server.jar 8000 0.0.0.0 20