
Hostile HTTP server with 81 broken and abusive responses for testing how curl, Python HTTP libraries and web browsers handle malformed replies.
A malicious HTTP response server for testing how different clients handle broken, malformed, and abusive HTTP responses. The goal is to compare how curl, Python HTTP libraries (urllib, http.client, requests, aiohttp), and web browsers react to protocol violations, edge cases, and deliberately hostile payloads.
badtests.py is a single-file HTTP server with 81 test endpoints. Each one returns a deliberately broken or abusive response targeting a specific aspect of HTTP handling. Categories include:
The server also includes a /logs page that records every request with full headers, and a /fingerprint page for browser fingerprinting.
Start the server:
python3 badtests.py
It listens on port 60666. Open http://localhost:60666/ in a browser to see the full index of tests, or hit endpoints directly with curl.
test.sh runs every endpoint through curl and captures the output:
./test.sh localhost:60666
test.py runs every endpoint through urllib, http.client, requests, and aiohttp:
python3 test.py
Both scripts have timeouts and output caps to prevent hanging on infinite streams.
| File | Description |
|---|---|
badtests.py | The server. Single file, no dependencies beyond Python 3 stdlib. |
test.sh | Bash script to test all endpoints with curl. |
test.py | Python script to test all endpoints with urllib, http.client, requests, aiohttp. |
RESULTS.md | Detailed results and analysis of client behavior differences. |
results_curl.txt | Raw curl output from test.sh. |
results_python.txt | Raw output from test.py. |