etf-validator / etf-webapp

:earth_africa: :mag: ETF is an open source testing framework for spatial data and services
https://www.etf-validator.net
European Union Public License 1.2
18 stars 19 forks source link

Remote file (URL): No files were found with a gml or xml file extension #146

Closed juremekis closed 6 years ago

juremekis commented 6 years ago

I'm using the INSPIRE validator to validate metadata, using this URL as Data source. The app gives me the following error:

Test run initialization failure: No files were found with a gml or xml file extension!

slika

The etf-webapp should check the remote URL's Content-Type HTTP header for XML /GML content instead of just checking for an appropriate extension.

In my case, the header is Content-Type:application/xml;charset=UTF-8, which should be accepted as a valid remote URL.

jonherrmann commented 6 years ago

Thanks for reporting this issue.

The Validator first uses the Content-Disposition Header than searches for an ending in the URL and afterwards uses the Content-Type header. This is done because many services just return inappropriate Content-Type headers like text/plain for a XML file.

In your case .get is found as file ending. The mechanism has to be changed.