MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / _push

Method _push

src/core/register.py:254–266  ·  view source on GitHub ↗
(name: Optional[str], value: Optional[str])

Source from the content-addressed store, hash-verified

252 order: list[str] = []
253
254 def _push(name: Optional[str], value: Optional[str]):
255 key = str(name or "").strip()
256 val = str(value or "").strip()
257 if not key:
258 return
259 if key not in cookie_map:
260 cookie_map[key] = val
261 order.append(key)
262 return
263 # 同名 cookie 可能来自不同域/路径:优先保留非空且更长值,避免空值覆盖有效分片。
264 prev = str(cookie_map.get(key) or "").strip()
265 if (not prev and val) or (val and len(val) > len(prev)):
266 cookie_map[key] = val
267
268 # 1) 常规 requests/curl_cffi 字典接口
269 try:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected