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

Test suite fails when URL provided is an OGC service call #138

Open
aaime opened this issue Jan 25, 2025 · 2 comments · May be fixed by #139
Open

Test suite fails when URL provided is an OGC service call #138

aaime opened this issue Jan 25, 2025 · 2 comments · May be fixed by #139
Assignees

Comments

@aaime
Copy link

aaime commented Jan 25, 2025

Describe the bug
When the file URI provided to the test is an OGC service call, e.g., a WFS GetFeature producing a GeoPackage, the test fails complaining the file extension is ".db".

The issue is in the computation of the "suffix" in URIUtils:

		String suffix = (lastIndexOfDot > 0) ? uriRef.getPath().substring(lastIndexOfDot) : ".db";

The code is assuming the provided path is either a local filesystem reference, or a HTTP reference to a static file.
With an OGC request like:

http://my/wfs/service?service=WFS&version=1.0.0&request=GetFeature&typeName=topp%3Astates&outputFormat=application/geopackage%2Bsqlite3

The above code will end up using ".db" as the extension, and the file extension test in the suite will fail.

Expected behavior
A service has an opportunity to specify the desired filename using the ContentDisposition header. That should be checked too.

I will follow up with a pull request, containing a tentative fix.

@aaime
Copy link
Author

aaime commented Jan 25, 2025

Pull request with a tentative fix here:
#139

@dstenger
Copy link
Contributor

Thank you for providing the pull request. We will review it soon.

@dstenger dstenger added this to CITE Jan 27, 2025
@github-project-automation github-project-automation bot moved this to To do in CITE Jan 27, 2025
@dstenger dstenger moved this from To do to To verify in CITE Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To verify
Development

Successfully merging a pull request may close this issue.

3 participants