/webserv

An HTTP web server written in C++

Primary LanguageC++MIT LicenseMIT


Logo

webserv

An RFC compliant HTTP web server written in C++98

42 Abu Dhabi
mfirdous · hsarhan

Table of Contents
  1. About The Project
  2. Features
  3. Getting Started
  4. License

About The Project

Web Server

This project is an implementation of an HTTP web server written in C++. The server can handle incoming multiple concurrent requests from web clients and serve them with HTML files or other static resources, such as images or CSS files. The server also supports the HTTP/1.1 protocol, including features such as persistent connections, chunked encoding, and content compression. In addition, the server includes support for dynamic content generation through CGI scripts, allowing developers to write server-side scripts in languages such as Perl or Python.

This HTTP web server is a highly reliable implementation that remains stable even under extreme loads and with limited system resources. Its efficient design ensures that the server can handle a large number of incoming requests without crashing or hanging

Features

  • Able to handle multiple concurrent requests
  • Implements the HTTP protocol including GET, POST, and DELETE requests
  • HTTP/1.1 support with persistent connections and chunked encoding
  • Static file serving for HTML files, images, and other resources
  • CGI script support for dynamic content generation
  • Robust and resilient implementation
  • Parses a configuration file
  • Handles multiple CGIs
  • Supports cookies and session management

(back to top)

Getting Started

Prerequisites

The only prerequisites for this project are a C++ compiler and the Make build system

This project produces no warnings even with strict warning flags on gcc and clang

  • To compile

      make
  • To run our tests

      make test

Usage

  • To run the web server with default configuration

      ./webserv
  • To run the web server with a custom configuration

      ./webserv ./server.conf

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)