Give host-only cookies the browser's domain - #1544
Merged
Merged
Conversation
Closes #1502 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJDy3qA1LyNTh11zS98ukM
adamtheturtle
force-pushed
the
adamtheturtle/vws-web-tools-issue-1502
branch
from
August 27, 2026 08:05
1f9f7af to
89070e5
Compare
``if domain:`` was only ever taken as true, because the test driver always reported a URL with a hostname, leaving the suite below the 100% coverage gate. Make the test driver's URL configurable and add a case where a host-only cookie is read from a URL with no host, which is the situation the guard exists for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tz9oY7GG92jssXJFUBDr5B
adamtheturtle
force-pushed
the
adamtheturtle/vws-web-tools-issue-1502
branch
from
August 27, 2026 09:09
89070e5 to
e386ae2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1502.
_requests_session_from_drivercopies the browser's cookies into arequestssession. When a cookie had nodomainattribute it was set without one, which inrequestsmeans a cookie with an empty domain — and a cookie with an empty domain matches no request, so it is never sent. The cookies most likely to arrive that way are host-only cookies for developer.vuforia.com itself, which is exactly the session state these API calls need.Such cookies now get the host from the browser's current URL.
The cookie is still skipped if there is no host to fall back to, so a driver on
about:blankbehaves as before rather than setting a domainless cookie.The
_BrowserStateDrivertest shell gains acurrent_url, and the existing assertion for the no-domain cookie now checks it is retrievable fordeveloper.vuforia.comrather than for nothing.🤖 Generated with Claude Code
https://claude.ai/code/session_01YJDy3qA1LyNTh11zS98ukM