Skip to content

wms_service_cache should use complete url - #3176

Open
JanEisermann wants to merge 5 commits into
Open-MSS:developfrom
JanEisermann:wms_service_cache_2841
Open

wms_service_cache should use complete url#3176
JanEisermann wants to merge 5 commits into
Open-MSS:developfrom
JanEisermann:wms_service_cache_2841

Conversation

@JanEisermann

Copy link
Copy Markdown
Collaborator

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:

  • Bug fix. Fixes #
  • New feature (Non-API breaking changes that adds functionality)
  • PR Title follows the convention of <type>: <subject>
  • Commit has unit tests

@ReimarBauer ReimarBauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

Comment thread mslib/utils/service_manager.py Outdated
JanEisermann and others added 2 commits September 2, 2026 13:12
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>
Comment thread mslib/utils/service_manager.py Outdated
import urllib.parse

# query parameters which describe a single request instead of the service itself
OGC_REQUEST_PARAMS = ("service", "request")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How often is that imported? Or why do you think that it is good to have it defined as a constant?

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.

wms_service_cache should use complete url

2 participants