Repository navigation
fix: resolve relative URLs against base_url in cache keys - #425
Merged
Merged
Conversation
Cache keys were built from the URL as passed to the request, before aiohttp resolves a relative URL against the session's `base_url`. So `GET /x` got the same key for every base URL, and sessions sharing a cache backend returned each other's cached responses. Requests, `has_url()`, and `delete_url()` now resolve relative URLs first. `ClientSession._build_url()` isn't used for this because it's private and, in older aiohttp versions, asserts that the URL is relative whenever `base_url` is set. Cache entries saved for relative URLs won't be found after upgrading. Fixes requests-cache#422
Collaborator
Author
|
There are no other bugs I am aware of, and no pending PRs. Please proceed with the |
Member
|
Done! v0.15.0 is out on PyPI now. |
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 #422