IIIF / image-validator

Validator for the Image API
http://iiif.io/api/image/validator/
Apache License 2.0
35 stars 20 forks source link

Validator should handle HTTPS scheme #81

Closed regisrob closed 4 years ago

regisrob commented 4 years ago

When running the validator locally, I noticed that it does not seem to take into account the --scheme parameter:

iiif-validate.py -s example.org --scheme=https -p iiif -i 67352ccc-d1b0-11e1-89ae-279075081939.jp2 --version=2.0 --level=1 -v

The verbose output shows that image requests are being sent to "http://example.org" instead of "https://example.org". Moreover, test n°14 fails erroneously because the validator expects an HTTP url in the info.json id field.

[14] test info_json FAIL
  url: ['http://example.org/iiif/67352ccc-d1b0-11e1-89ae-279075081939.jp2/info.json']
  got: False
  expected: True
  type: @id is correct URI
  message: Found: https://example.org/iiif/67352ccc-d1b0-11e1-89ae-279075081939.jp2 Expected: http://example.org/iiif/67352ccc-d1b0-11e1-89ae-279075081939.jp2
  Is Warning?: False

This is a different issue as #43.

glenrobson commented 4 years ago

This is works OK now on the deployed live version:

https://iiif.io/api/image/validator/results/?server=https%3A%2F%2Fccj-iiif.huma-num.fr&prefix=iiif%2Fimage&identifier=JP2%2F67352ccc-d1b0-11e1-89ae-279075081939.jp2&version=2.0&level=1&id_basic=on&id_squares=on&info_json=on&id_error_escapedslash=on&id_error_random=on&id_error_unescaped=on&id_escaped=on&region_error_random=on&region_pixels=on&size_ch=on&size_error_random=on&size_percent=on&size_region=on&size_wc=on&rot_error_random=on&quality_error_random=on&format_jpg=on&format_error_random=on&baseurl_redirect=on&cors=on&jsonld=on

but running from the command line it does show this error... Using the latest version from github master.

glenrobson commented 4 years ago

Testing with the following command line:

iiif-validate.py -s ccj-iiif.huma-num.fr —-scheme=https -p iiif/image -i JP2/67352ccc-d1b0-11e1-89ae-279075081939.jp2 --version=2.0 --level=1 -q

which is showing the error.

glenrobson commented 4 years ago

Looks to be an invalid - -- worked OK.