mirror of
https://github.com/go-gost/gost.git
synced 2026-10-08 12:05:46 +00:00
tests/e2e: add HTTP response cache e2e tests
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user