This commit is contained in:
Redsandyg
2026-06-15 06:31:35 +03:00
commit fcc9139361
50 changed files with 5400 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env python3
"""HTTP backend that delays each response for limit_conn tests."""
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
import time
class SlowHandler(BaseHTTPRequestHandler):
def do_GET(self):
time.sleep(5)
self.send_response(200)
self.send_header("Content-Type", "text/plain")
self.end_headers()
self.wfile.write(b"slow-ok\n")
def log_message(self, fmt, *args):
pass
if __name__ == "__main__":
ThreadingHTTPServer(("0.0.0.0", 8081), SlowHandler).serve_forever()