#!/usr/bin/env python3
"""Minimal HTTP server for the GLES2 OnReturnData underflow POC."""
import http.server
import socketserver
import os

os.chdir(os.path.dirname(os.path.abspath(__file__)))

class Handler(http.server.SimpleHTTPRequestHandler):
    def end_headers(self):
        self.send_header('Cache-Control', 'no-store')
        super().end_headers()

PORT = 9876
socketserver.TCPServer.allow_reuse_address = True
with socketserver.TCPServer(("127.0.0.1", PORT), Handler) as httpd:
    print(f"Serving POC on http://127.0.0.1:{PORT}/poc.html", flush=True)
    httpd.serve_forever()
