Skip to content
A toy HTTP server written in Python for understanding how web servers work.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
httpserver
.gitignore
LICENSE
README.md

README.md

http-server

This is a simple web server written in Python. I built this to understand how HTTP works. Some more info behind this server can be found in my blog - http://blog.ansals.me/2019/04/07/writing-a-simple-web-server-in-python/

The web server contains three parts -

  1. TCP Server httpserver/tcpserver.py
  2. HTTP Server httpserver/httpserver.py
  3. File system handler httpserver/handler.py

A few examples using the above classes can be found in the examples folder. To run the web server from the examples folder, run python3 examples/http_file_server.py

You can’t perform that action at this time.