| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A dependency-free HTTP/1.1 server built directly on Python sockets. The project demonstrates request parsing, persistent connections, bounded concurrency, static-file streaming, JSON uploads, and basic path/host validation without a web framework.
TCP listener
-> bounded connection queue
-> fixed worker threads
-> HTTP request parser
-> host/path/content validation
-> static-file response or JSON upload
Requires Python 3.10 or newer. From the repository root:
python3 server.pyOptional positional arguments set the port, host, and worker count:
python3 server.py 8080 127.0.0.1 10Then open http://127.0.0.1:8080.
Fetch the home page:
curl -i http://127.0.0.1:8080/Upload JSON:
curl -i -X POST http://127.0.0.1:8080/upload \
-H 'Content-Type: application/json' \
-d '{"hello":"world"}'Check traversal protection (the client must preserve the path):
curl -i --path-as-is http://127.0.0.1:8080/../etc/passwdpython3 -m unittest discover -s tests -vThe streaming test creates a deterministic multi-chunk payload in a temporary directory. Large generated binaries are not stored in the repository.
server.py Socket server, worker pool, parser, and handlers
resources/ Static demo files
resources/uploads/ Runtime JSON uploads (ignored by Git)
tests/ Dependency-free unit tests
The original coursework attribution is preserved in Git history; this README focuses on the engineering decisions a reviewer can verify in the repository.
| Back | FazBrowse Home | New Git URL |