/23.-Webserv

This project is about writing a HTTP server in C++. HTTP is one of the most used protocol on internet. Knowing its arcane will be useful.

Primary LanguageC++

Webserv

Table of contents

Goal

Code a HTTP server in C++ 98

SERVER_HTTP

Requirements

Server

  • Configuration file as argument
  • Server must never block and the client can be bounced properly if necessary
  • Epoll
  • NGINX is HTTP 1.1
  • Accurate HTTP response status codes
  • Common Gateway Interface : php
  • File uploads
  • GET POST DELETE
  • Serve a fully static Website
  • Resilience : must stay available at all cost

Configuration file

  • Port and host of each ’server’
  • Setup the server_names or not.
  • Default error pages
  • Limit client body size
  • HTTP redirection
  • Set up routes with one or multiple of the rules (cf Subject)

Bonus

  • Multiple CGI : Python
  • Cookies & Session Management

42 Project 125/100

This project was done with Charles M. and Francesco L.

Compilation test

Resources

RFC

Sockets

Status codes & Methods

Modèle OSI & TCP/IP

nc & curl to test the Server

Chunked transfer encoding