Skip to content
Ilia Munaev edited this page Sep 22, 2025 · 21 revisions

Welcome to the webserver wiki!

Task division

Vlad – Server Core & I/O (Socket + Multiplexing)

Responsibilities:

Open and manage listening sockets (multiple ports).

Implement poll/epoll/select for non-blocking I/O.

Accept new clients and keep track of client states (reading, writing, parsing).

Enforce non-blocking behavior and prevent hangs.

Handle timeouts and client disconnections.

Laurens – HTTP Request & Config Parser

Responsibilities:

Parse HTTP requests (request line, headers, body).

Handle chunked requests and POST/DELETE methods.

Map requests to routes based on configuration file.

Parse the configuration file:

Ports, hosts, server_names

Route rules (allowed methods, redirection, directory/file mapping, CGI mapping, directory listing, index files)

Error pages, body size limits

Keep request objects that other modules can use.

Ilia – Response Builder, Static & CGI Handling

Must:

  • serve a fully static website
  • at least GET, POST, and DELETE methods
  • CGI Common Gateway Interface ??

Responsibilities:

Build HTTP responses: status line, headers, body.

Serve static files.

Handle error pages (default + custom).

Implement CGI execution: run scripts, pass data, collect output.

Handle file uploads and saving to correct locations.

Support redirection and directory listing.

Timeline

Week 1 – MVP / Core Setup

Vlad: Socket setup, non-blocking I/O, poll loop.

Laurens: Basic request parsing (request line, headers).

Ilia: Basic response builder (hardcoded responses, simple static file).

Goal: Browser/curl can GET a static page.

Week 2 – Routing & HTTP Compliance

Laurens: Config file parser, route mapping, allowed methods.

Ilia: Static file serving, error pages, directory listing.

Vlad: Refining multi-client support.

Goal: GET requests work for multiple routes and ports; proper HTTP codes.

Week 3 – CGI, POST, DELETE, Uploads

Ilia: Implement CGI, file uploads, POST handling, DELETE method.

Laurens: Ensure parser handles POST bodies and chunked requests.

Vlad: Ensure server remains non-blocking under load.

Goal: Dynamic content works, uploads handled, multi-client stable.

Week 4 – Testing & Bonus Features

Integration testing, edge cases, stress tests.

Add cookies/session management. BONUS

Handle multiple CGI. BONUS

https://github.com/cclaude42/webserv/blob/master/srcs/webserv.cpp

https://github.com/waltergcc/42-webserv/tree/main

Example of server log information in picture: https://github.com/Kaydooo/Webserv_42?tab=readme-ov-file

Clone this wiki locally