HTTPD

RFC Compliant Web Server

Server Rack GIF

Network & Sockets

Daemon Process GIF

Daemonization

Project Overview

HTTPd is a rigorous implementation of a web server capable of handling HTTP/1.1 requests. The goal was to understand the underlying mechanisms of the web: parsing protocols, managing connections, and running as a background system service (Daemon).
Grade achieved: 77% (Successful validation of core features and stability).

Data Transfer GIF

Core Architecture

The project required building a robust architecture handling the full lifecycle of a request without blocking the system.

1. Network Layer (Sockets)

Implementation of the TCP/IP stack using C sockets (socket, bind, listen, accept). The server handles client connections and ensures data integrity during transmission.

2. HTTP Parsing (RFC 9112)

A custom parser processes raw bytes into structured HTTP requests. It validates:

Matrix Code
Coding typing

Key Features

Feature Description
Daemon Mode The server detaches from the terminal (double fork), manages PID files, and handles signals (SIGINT, SIGTERM) for graceful shutdowns.
Configuration Dynamic loading of settings (Port, IP, Root Directory) via a configuration file.
Virtual Hosts Basic support for vhosts to serve different content based on the requested Host header.
Logging Detailed access logs allowing traffic monitoring and debugging.

Conclusion

This project provided deep insights into network programming and system calls. Handling the strict constraints of the HTTP RFC taught me precision in protocol implementation and memory management in long-running processes.