Skip to content
David Mvoula
All projects

HTTP server from scratch

An HTTP server written in Python with no framework: GET, POST, files, concurrent connections, compression.

Category
Personal
Context
Personal project
Date
2024
Duration
1 month
Team
David MVOULA
ClientServer · PythonGET /index.html HTTP/1.1200 OK · Content-Encoding: gzipPOST /files/rapport.txt201 Createdconcurrent connections$ python server.py --directory /tmp
A schematic drawn from the project. This is not a screenshot.

Duration · out of 12 months

Description

An HTTP server written in Python, with no framework. It handles GET and POST requests, serves static files, accepts several connections at once and compresses responses. Written to understand what a framework does for me.

Stack

  • Python

Notes

Features

  1. 1GET and POST requests
  2. 2Concurrent connections
  3. 3Response compression
  4. 4Static files
  5. 5Request logging

Challenges

  1. 1Implementing the HTTP protocol with no external library
  2. 2Handling concurrent connections