HTTP Server
- Repository: HttpServerJava
- Technologies: Java · Sockets · HTTP Protocol · OOP · Unit Testing
- Status: Completed
Project Overview
This project is a simple yet powerful HTTP server built from
scratch in Java. It handles HTTP requests, manages
configurations, supports cookies for session tracking, and
includes unit tests to validate request parsing and protocol
handling.
Core Features
- HTTP Request Handling: Parses and processes basic HTTP methods (GET, HEAD).
- Multithreaded Design: Uses worker threads to handle multiple client connections concurrently.
- Configuration Management: Loads server settings such as port number and web root via a custom configuration manager.
- Cookie Support: Implements cookies for maintaining stateful sessions between server and clients.
- Error Handling: Includes custom exceptions for parsing errors and unsupported HTTP versions.
- Testing: Includes unit tests for request parsing and protocol validation to ensure server robustness.
Project Structure
core
: Server startup and thread managementconfig
: Configuration manager and settings-
http
: Request parsing, version handling, status codes, methods exceptions
: Custom error classes
Conclusion
The HttpServerJava project demonstrates a clear understanding of
networking concepts, HTTP protocols, and Java multithreading.
It’s a lightweight yet extensible base for anyone looking to
learn or build on top of custom server logic.