Skip to content

fix: clear expired websocket cookies - #144

Open
kocaemre wants to merge 1 commit into
agentclientprotocol:mainfrom
kocaemre:fix/ws-cookie-expiry-clears-store
Open

fix: clear expired websocket cookies#144
kocaemre wants to merge 1 commit into
agentclientprotocol:mainfrom
kocaemre:fix/ws-cookie-expiry-clears-store

Conversation

@kocaemre

Copy link
Copy Markdown

Summary

  • Clear stored WebSocket affinity cookies when a Set-Cookie response explicitly expires them with Max-Age=0 or an epoch Expires value.
  • Add regression coverage so reconnects do not keep sending a stale affinity cookie after logout/session rotation.

Test Plan

  • uv run pytest tests/http/test_cookies.py tests/http/test_ws_cookies.py -q — 10 passed
  • uv run ruff check src/acp/_cookies.py tests/http/test_cookies.py tests/http/test_ws_cookies.py — passed
  • uv run ruff format --check src/acp/_cookies.py tests/http/test_cookies.py tests/http/test_ws_cookies.py — 3 files already formatted
  • git diff --check — passed
  • make test — 258 passed, 1 skipped
  • make check — passed

Signed-off-by: Emre K <110906681+kocaemre@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant