INNER CODE UNIT · Python

do_POST

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

        def do_POST(self):
            path = self.path.split("?", 1)[0]
            if path not in ("/oauth/token", "/oauth/session", "/oauth/session/result"):
                self._json(404, "not_found")
                return
            if not _allow(self._client_ip()):
                self._json(429, "rate_limited")
                return
            try:
                if path == "/oauth/token":
                    length = int(self.headers.get("Content-Length", "0") or "0")
                    if length <= 0 or length > MAX_BODY:
                        raise ProxyError(400, "invalid_request")
                    raw = self.rfile.read(length)
                    parsed = parse_qs(
                        raw.decode("utf-8", "replace"), keep_blank_values=False
                    )
                    form = {key: values[0] for key, values in parsed.items() if values}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…