wms_service_cache should use complete url - #3176
Open
JanEisermann wants to merge 7 commits into
Open
Conversation
ReimarBauer
reviewed
Sep 3, 2026
ReimarBauer
reviewed
Sep 7, 2026
ReimarBauer
requested changes
Sep 9, 2026
ReimarBauer
left a comment
Member
There was a problem hiding this comment.
this looks strange, you have added changes which are not yours
Collaborator
Author
|
It happened while I rebased. I don't know why it looks strange like that. I try a new rebase. |
JanEisermann
force-pushed
the
wms_service_cache_2841
branch
from
September 9, 2026 14:07
7df3722 to
7d4f6b7
Compare
Slugifying the normalized url collapses all url separators into "-", so distinct services map onto the same key, e.g. "http://a.com:1/wms" and "http://a.com/1/wms" both became "http-a-com-1-wms". The same happened for query parameters versus path elements. The normalized url is a fine dict key on its own, so keep it as is. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Cover the urls which collided when the key was slugified (port versus path element, host boundary, query parameters versus path) as well as the urls which have to share a key (GetCapabilities parameters, order of the remaining parameters, case of scheme and host) and the cache lookups of WMSServiceManager built on them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JanEisermann
force-pushed
the
wms_service_cache_2841
branch
from
September 9, 2026 14:14
7d4f6b7 to
ce186f4
Compare
ReimarBauer
requested changes
Sep 11, 2026
|
|
||
|
|
||
| def strip_request_params(url): | ||
| """Remove the OGC request parameters (service, request) from an url. |
Member
There was a problem hiding this comment.
strip_request_params('http://example.com/wms?dataset=&service=WMS')
# -> 'http://example.com/wms' (dataset= vanished, not just service=WMS)
strip_request_params('http://example.com/wms?debug&service=WMS')
# -> 'http://example.com/wms' (bare `debug` flag vanished)
This directly contradicts the docstring's guarantee ("All other query parameters are kept in their original order")
Maybe fix the docstring to what it is doing. Recheck what is needed.
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.
Purpose of PR?:
Fixes #2841
Does this PR introduce a breaking change?
use of a slugify version of the full url instead of the base_url in the wms_service_cache
If the changes in this PR are manually verified, list down the scenarios covered::
tests succeed, not manually verified
Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Does this PR results in some Documentation changes?
If yes, include the list of Documentation changes
Checklist:
<type>: <subject>