A fully functional HTTP/1.1 server written in C++98 from scratch. This project is a deep dive into network programming, non-blocking I/O multiplexing, and RFC compliance.
- HTTP/1.1 Compliance: Handles
GET,POST, andDELETEmethods with appropriate status codes and chunked request handling. - CGI Support: Executes dynamic Python and PHP scripts with full environment variable handling.
- Resilient & Stress-Tested: Designed to never crash, efficiently handling network errors, abrupt disconnections, and massive traffic loads.
Instead of a basic sequential reader, we engineered a custom LR Parser based on a state table. This allows the server to systematically validate and load complex, nested Nginx-like configuration files while ensuring robust error reporting during syntax analysis.
The core event loop is built using Linux epoll, driving a non-blocking I/O matrix. It efficiently monitors multiple file descriptors simultaneously, handling incoming connections, read/write states, and unexpected network drops smoothly without wasting CPU cycles.
To ensure maximum code reliability and standard compliance, we established a strict GitFlow workflow backed by automated checks:
- Automated compilation verification scripts.
- Static code analysis integrated via
clang-tidy.
git clone https://github.com/Luma-3/WebServ.git && cd WebServ && makeRun the server with our default documentation website configuration:
./webserv conf/website.confOnce launched, open your browser and navigate to http://localhost:8080 to access the built-in documentation and configuration guide.
We built a comprehensive test suite to ensure server reliability:
make test && run ./run_all_test.sh all -yIf you start the webserv with the classic website, you will be taken to the index page of the webserv. On this page you will find the documentation with all the configuration information.
