tests/e2e: add HTTP response cache e2e tests

This commit is contained in:
ginuerzh
2026-07-26 18:14:03 +08:00
parent 5204d6285e
commit 5a1a799848
6 changed files with 379 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
from http.server import BaseHTTPRequestHandler, HTTPServer
_counter = 0
class Handler(BaseHTTPRequestHandler):
def do_GET(self):
global _counter
_counter += 1
body = b"cache-test-%d" % _counter
self.send_response(200)
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def log_message(self, format, *args):
return
HTTPServer(("0.0.0.0", 5677), Handler).serve_forever()