ISAITB / shacl-validator

Web and command-line application for the validation of RDF data.
https://joinup.ec.europa.eu/collection/interoperability-test-bed-repository/solution/rdf-validator
European Union Public License 1.2
15 stars 1 forks source link

Validator does not follow redirects from http --> https #13

Closed Markus92 closed 1 month ago

Markus92 commented 1 month ago

Apologies for opening multiple issues in a day! We've been putting it in the hands of our users, as to say ;)

During testing of the SHACL validator, it was discovered it does not follow 301 (or other) redirects, but also does not give an error. It instead seems to return a correct result: 0 error(s), 0 warning(s), 0 message(s). When inspecting the validated content, not a lot shows up though: the HTTP body was empty.

Test URI: http://fdp.healthdata.nl; which would redirect to HTTP. Response from server when querying:

~ » curl -v http://fdp.healthdata.nl
* Host fdp.healthdata.nl:80 was resolved.
* IPv6: (none)
* IPv4: 20.50.2.68
*   Trying 20.50.2.68:80...
* Connected to fdp.healthdata.nl (20.50.2.68) port 80
> GET / HTTP/1.1
> Host: fdp.healthdata.nl
> User-Agent: curl/8.6.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Content-Length: 0
< Date: Tue, 16 Jul 2024 12:16:23 GMT
< Location: https://fdp.healthdata.nl/
<

Some kind of error message on empty data might be nice, but of course it'd be even better if the redirect were to be followed.

costas80 commented 1 month ago

Apologies for opening multiple issues in a day!

On the contrary, thanks for the feedback @Markus92!

The remote URI resolution indeed needs an improvement to correctly follow redirects (one or multiple). We'll work on a fix for this and I'll let you know on this issue when the update is available.

costas80 commented 1 month ago

Hi @Markus92. The validator (latest docker image and our managed service) is now updated to follow all redirects.

Could you confirm from your end that all is ok so that we close the issue? Thanks!

PatrickDekkerHealthRI commented 1 month ago

Hi @costas80, I checked the managed service at it works as expected, It does now follow the redirect from http -> https. (using http://fdp.healthdata.nl)

thx!