MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / api_ping

Function api_ping

Scripts/ButSystem.py:13715–13726  ·  view source on GitHub ↗

api_ping. Route handler or application helper. This docstring was expanded to make future maintenance easier. Returns: Varies.

()

Source from the content-addressed store, hash-verified

13713 # Download with a cap to avoid abuse.
13714 max_bytes = CHAT_MAX_BYTES # 33 MB
13715 size = 0
13716 mime = "image/gif"
13717 filename = "gif.gif"
13718
13719 req = urllib.request.Request(
13720 gif_url,
13721 headers={
13722 "User-Agent": "ButSystem/1.0 (+https://example.invalid)",
13723 "Accept": "image/gif,image/*,video/*,*/*;q=0.8",
13724 },
13725 method="GET",
13726 )
13727 try:
13728 with _safe_urlopen(req, timeout=12) as resp:
13729 ctype = (resp.headers.get("Content-Type") or "").split(";")[0].strip().lower()

Callers

nothing calls this directly

Calls 2

mark_onlineFunction · 0.70
current_userFunction · 0.70

Tested by

no test coverage detected