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

Merged
merged 6 commits into from
Oct 28, 2024

Conversation

ejn
Copy link
Contributor

@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.

Copy link
Member

@jahow jahow left a comment

Choose a reason for hiding this comment

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

Very good, thank you for this improvement!

@jahow
Copy link
Member

jahow commented Oct 25, 2024

This will be merged as soon as it is rebased, thanks!

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
@ejn
Copy link
Contributor Author

ejn commented Oct 28, 2024

@jahow Thank you for the positive review! I have rebased onto the current state of main, so hopefully this can now be merged?

@jahow jahow merged commit ea0f0b6 into camptocamp:main Oct 28, 2024
1 check passed
@jahow
Copy link
Member

jahow commented Oct 28, 2024

All good, thanks again!

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.

2 participants