Skip to content

Webserv is a HTTP/1.1 server written in C++98, compliant with RFC

Notifications You must be signed in to change notification settings

nenieiri-42Yerevan/Webserv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webserv

Webserv is a HTTP/1.1 server written in C++98.

Description

The objective of this project is to create a HTTP web server. It compliant with RFC and implements Get, Post and Delete methods. So it can serve static web pages, dynamic pages thanks to CGI (PHP, python). It is fully configurable though a config file, inspired by Nginx format.

Usage

# Compile the sources
make all
# Run the server
./webserv [config_file]

Configuration File

See example of configuration in 'Configs' directory

Features

✅ It supports:

  • [GET, POST, DELETE] HTTP methods
  • A configuration file given as an argument
  • Php CGI
  • Serve a fully static website
  • Default error pages if none are provided
  • File uploading
  • Accurate HTTP response status codes
  • Understand chunked requests
  • Listen to multiple ports
  • Run multiple sites

As bonus

  • Support cookies and session management
  • Python CGI

❌ It doesn't support:

  • other HTTP methods

Useful links

1) bind
2) select, poll, epoll
3) cookies, sessions

Authors