Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use self-reported operation URLs from capability documents #69

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ejn
Copy link

@ejn ejn commented Sep 25, 2024

OWS Capability documents include definitions of the URLs to be used for all operations. As a general rule these are (i) all the same and (ii) the same as the URL from which the capabilities document was retrieved. This is however not necessarily the case, e.g. where request forwarding has occured. Formally, these self-reported URLs should be used for all operations.

This PR therefore exposes the self-reported operation URLs in the API and also uses these as the base for generated request URLs.

Notes:

  1. some changes in some existing tests were necessary as "fake" URLs are used for mock requests, which are replaced by the self-reported URLs once the capabilities have been replaced.
  2. Tests for the capabilities URL before the loading has completed (which will return a value based on using the request URL passed to the constructor and not the self-reported URL) are marked as skipped as due to the mocking the async calls actually complete synchronously and it is not currently possible to test the state before the capabilities were loaded.

WMS Capabilities documents self-report the URLs to be used
for operations. These self-reported URLs should be used
rather than the URL used to retrieve the capabiliites.
Due to the mocking of the async loading of the capabilities
the loading occurs instantaneously and the state before they
are loaded is not tested correctly
WFS Capabilities documents self-report the URLs to be used
for operations. These self-reported URLs should be used
rather than the URL used to retrieve the capabiliites.
Due to the mocking of the async loading of the capabilities
the loading occurs instantaneously and the state before they
are loaded is not tested correctly
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