Skip to main content
Back to index

03Project

Repository

Webserv

RFC-compliant HTTP/1.1 server in pure C++

A web server written from scratch in C++ with no external library: RFC 7230-compliant HTTP/1.1 parsing, I/O multiplexing and CGI script execution.

Context

Reimplementing a web server straight from the RFC reveals everything frameworks hide: header parsing, persistent connections, the exact semantics of every status code. The real difficulty lies elsewhere — serving several clients at once on a single thread means never blocking, which means driving everything through `select()` and tracking the state of each connection yourself. The server is configured through a file whose format is close to nginx.

Features

  • 01Complete, RFC-compliant HTTP/1.1 server
  • 02I/O multiplexing with select() on a single thread
  • 03Concurrent handling of multiple clients
  • 04CGI support (PHP, Python, shell scripts)
  • 05Flexible configuration-file parsing
  • 06Full HTTP error-code handling

Screenshots

01 / 07
Webserv01 / 07
Screenshot of Webserv (1/7)