Closed philipashlock closed 9 years ago
Resource URL content type, and status code are checked during data entry and displayed to the user (see the below screenshot), however it wont stop the user from entering the data with inconsistent format, given the broad format types it would be better to leave it to agency user entering data to make the final decision.
All checks are present on the resource create page, there are few ajax checks pending on the dataset page which could be given as warning or error based on the error type, those would be ready in next release 1.26.
URL and format check by http head request are completed, and also a pending issue on some of the URLs not being reachable on the hosting provider is resolved.
The URL and format should be verified when a resource is added. There's already a separate issue (#143) about properly handling the validation for whether these were included or not, but this issue is about verifying whether the URL and format are correct using an HTTP HEAD check to see if the response code is 200 for the URL and to see if the Content-Type matches the format specified.
This could be done in the background and displayed with javascript as the fields are being filled out, but it could also just be done as part of the normal validation when the form is submitted.
This seems like it would be of general value for other users of CKAN, so let's also consider making this something that can be merged back to core.