A simple multi-threaded HTTP server written in python. This was originally written following along CodeCrafters "Build your own HTTP server" challenge.
This repo is running automated tests with github workflow (assuming port 4221). You can view those logs, or you can test it out yourself!
To test it out, try running the following:
python server.py --direction ./store/
and in another terminal
curl -si POST http://localhost:4221/files/test -H "Content-Length: 5" -H "Content-Type: application/octet-stream" -d 'hello'
this demonstrates a POST request to a HTTP server!
- /echo/ endpoint
- /user-agent endpoint
- GET /files/
- POST /files/
- gzip compression
- automated tests (not in the RFC but I think it's cool)
- Case insensitivity
- HEAD method
- "406 Not Acceptable" status code, for unrecognized compression