INNER CODE UNIT · Python

Handler

Kounex/obs_blade · tool/kick_auth_proxy/proxy.py:286

    class Handler(BaseHTTPRequestHandler):
        protocol_version = "HTTP/1.1"

        def log_message(self, fmt, *args):
            # Status line only. BaseHTTPRequestHandler would include the path,
            # which is fine, but never the body. Keep this to method + status.
            return

        def _send(self, status: int, payload: bytes, content_type: str) -> None:
            self.send_response(status)
            self.send_header("Content-Type", content_type)
            self.send_header("Content-Length", str(len(payload)))
            self.send_header("Cache-Control", "no-store")
            self.end_headers()
            self.wfile.write(payload)

        def _json(self, status: int, message: str) -> None:
            self._send(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…