Skip to content

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

@aaime

Description

@aaime

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.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

To verify

Relationships

None yet

Development

No branches or pull requests

Issue actions