Skip to content

[GEOS-12149] GeoServer WMTS capabilities put query parameters in the wrong place in generated URLs#1554

Open
fernandor777 wants to merge 1 commit into
GeoWebCache:mainfrom
fernandor777:wmts-cap-param
Open

[GEOS-12149] GeoServer WMTS capabilities put query parameters in the wrong place in generated URLs#1554
fernandor777 wants to merge 1 commit into
GeoWebCache:mainfrom
fernandor777:wmts-cap-param

Conversation

@fernandor777

Copy link
Copy Markdown
Contributor

https://osgeo-org.atlassian.net/browse/GEOS-12149

This PR fixes WMTS capabilities URL generation so propagated query parameters, such as projecttoken, are appended after the existing WMTS query string instead of being injected into the middle of the URL path.

What changed:

  • Refactored WMTS capabilities URL handling to keep base URLs and propagated query parameters separate until final serialization.
  • Updated WMTS URL construction so resource and metadata backlinks preserve path placeholders and append propagated query parameters last.
  • Added/updated WMTS tests to cover:
    • existing query parameters
    • no existing query parameters
    • correct placement of propagated parameters
    • regression coverage for capabilities and TileJSON outputs

Behavior after the change, generated URLs now follow the expected structure:

  • .../rest/BasicPolygons/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}?format=image/png&projecttoken=abc123
  • .../rest/WMTSCapabilities.xml?projecttoken=abc123

Instead of malformed forms where query parameters appears before unresolved path segments.

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.

1 participant