Skip to content

Luma-3/WebServ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

230 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Frame 26

🌐 WebServ (HTTP 1.1 Server in C++98)


Score project :125 Static Badge GitHub repo size

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.


πŸ› οΈ Features

  • HTTP/1.1 Compliance: Handles GET, POST, and DELETE methods 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.

πŸ—οΈ Architecture & Engineering Highlights

πŸ” State-Table LR Parser

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.

πŸ”„ High-Performance Multiplexing (epoll)

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.

πŸ›‘οΈ Quality Assurance & GitFlow

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.

πŸš€ Getting Started

πŸ“₯ Installation & Compilation

git clone https://github.com/Luma-3/WebServ.git && cd WebServ && make

πŸš€ Launch default website

Run the server with our default documentation website configuration:

./webserv conf/website.conf

Once launched, open your browser and navigate to http://localhost:8080 to access the built-in documentation and configuration guide.

πŸ§ͺ Run unit tests

We built a comprehensive test suite to ensure server reliability:

make test && run ./run_all_test.sh all -y

πŸ“š See Documentation

If 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.

About

🌐 A fully functional HTTP/1.1 server from scratch in C++98. Features a state-table LR parser, Linux epoll multiplexing, and CGI support.

Topics

Resources

Stars

Watchers

Forks

Contributors