C++98 HTTP/1.1 web server from scratch.
Webserv is an HTTP server written in C++98 that complies with the HTTP/1.1 protocol. This project is an in-depth exploration of how URLs begin with HTTP and a step towards understanding the inner workings of web servers. The server is fully functional with a web browser, and follows the constraints of C++98, offering non-blocking operations and supporting essential HTTP methods such as GET, POST, and DELETE.
- HTTP/1.1 compliant server.
- Handles multiple simultaneous connections using poll() (or equivalent).
- Supports multiple HTTP methods: GET, POST, and DELETE.
- Non-blocking operations using file descriptors (FD).
- Customizable via configuration file.
- Error handling with default error pages.
- File uploads and static file serving.
- C++98 standard.
To compile the project, simply run the following command:
make
This will generate the executable webserv
.
Run the server with a configuration file:
./webserv [configuration file]
The server uses a configuration file to define its behavior, such as ports, routes, and error handling.
- GET: Retrieve static files or resources.
- POST: Submit data to the server.
- DELETE: Remove specified resources on the server.