IIIF / image-validator

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

404 and 403 means almost the same for slash identity #84

Open joesong168 opened 4 years ago

joesong168 commented 4 years ago

For some implementation, the web server's response to slash identity is hard to change. So is it possible to also tolerant 403?

Forward slash gives 404 Elapsed time (ms): 3684 url: http://iiif.etu.huiyouwenhua.com/image/a/b/full/full/0/default.jpg got: Expected 404 for status; Got: 403 expected: 404 type: url-check message: Failed to get random identifier from url http://iiif.etu.huiyouwenhua.com/image/a/b/full/full/0/default.jpg. warning: false

glenrobson commented 4 years ago

According to the spec the response codes are:

Status Description
403 Forbidden The user, authenticated or not, is not permitted to perform the requested operation.
404 Not Found The image resource specified by identifier does not exist, the value of one or more of the parameters is not supported for this image, or the requested size is greater than the limits specified.

So I think 404 is the correct response but I'm open to allowing 403. What do you think @IIIF/editors?