This repository is for a self-made, toy HTTP/1.1 server using Java SE 18 libraries. Within this project, the server will implement a working part of the HTTP/1.1 specification in RFC 9112 based on a To-Do list. This also means that not all features of HTTP/1.1 will be implemented for the sake of simplicity.
- Clone this repository.
- Ensure that Java SE 18 and Maven are installed on your system.
- Run the project.
- Go to
http://localhost:8000
.
- Crude server route handler support using
IRequestHandler
lambda expressions. Each one takes a static resource cache as context along with request, response, and an optional HTTP error status. These mock a low-level API where calls to write a response status line, headers, and body are explicit. These should be explicity bound as needed. - Fallback server route handler to serve HTTP errors such as
404
or500
. This must be explicity bound before server start. - Crude finite state machine patterns in
ServerWorker
andHttpReader
to handle simple HTTP responses in an orderly way. - Supports a simple static folder path, but only uses the 1st nested level of files.