From ab713e49c45e28328f5190cfd41079cfb2887c90 Mon Sep 17 00:00:00 2001 From: Ingrid Sena <10999758+fullsushidev@users.noreply.github.com> Date: Thu, 23 Apr 2026 18:40:23 +0200 Subject: [PATCH] fix: handle suffixed gateway_sessionid in session expiry tracking Commit 6d6def8 added startswith-based matching for the gateway_sessionid cookie in gw_auth_client.get_cookies_from_response, but missed the same hardcoded exact match in GalaxyClient.check_or_refresh_gateway_session. This causes session_expires to never be set on suffixed deployments (e.g. gateway_sessionid44927), triggering a re-login on every HTTP call and overwriting any intentionally corrupted test headers. Fixes: AAP-66185 Co-Authored-By: Claude Opus 4.6 Signed-off-by: Ingrid Sena <10999758+fullsushidev@users.noreply.github.com> --- galaxykit/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxykit/client.py b/galaxykit/client.py index 7dda2ff..1057cff 100644 --- a/galaxykit/client.py +++ b/galaxykit/client.py @@ -195,7 +195,7 @@ def check_or_refresh_gateway_session(self): self.headers = self.gw_client.headers for cookie in self.response.cookies: - if cookie.name != "gateway_sessionid": + if not cookie.name.startswith("gateway_sessionid"): continue self.session_expires = cookie.expires break