opengeospatial / ets-cat30

OGC Catalogue 3.0 Conformance Test Suite
Other
0 stars 6 forks source link

getResourceById() fails when working with UUID #6

Closed pandzel-zz closed 9 years ago

pandzel-zz commented 9 years ago

OpenSearchGeoTests.getResourceById() substitutes {geo:uid} parameter in the URL template with the actual uid. If that uid has a form of UUID starting and ending with curly braces, then an exception is thrown from within OpenSearchTemplateUtils.buildRequestURI() at the line:

return URI.create(template);

with the message logged into the report like this:

<![CDATA[Illegal character in query at index 63: http://_host_:_port_/_context_?uuid={413982A1-1E93-4317-B2FB-8CDCA555807C}&f=atom]]>

I would suggest to URLEncode an identifier before passing to the template.

rjmartell commented 9 years ago

You mean that the actual record identifier (substitution value) contains curly braces? That seems a bit odd, but the specs don't appear to prohibit this.