IIIF/presentation-validator

Current live presentation validator isn't working

glenrobson opened this issue · 2 comments

Julien commented that the validator doesn't seem to be working and I confirmed that it isn't. I had run the validation 15mins before and it worked OK. The error (not reported by the validator) is a 404 for:

http://iiif.io/api/presentation/validator/service/validate/?url=https://www.e-manuscripta.ch/i3f/v21/742334/manifest&version=2.1

Looking at the error page it says:

Error: 404 Not Found

Sorry, the requested URL 'http://presentation-validator.iiif.io/validate/?url=https://www.e-manuscripta.ch/i3f/v21/742334/manifest&version=2.1' caused an error:

Not found: '/validate/'

trying without the slash after validate seems to work:

http://presentation-validator.iiif.io/validate?url=https://www.e-manuscripta.ch/i3f/v21/742334/manifest&version=2.1

Using CURL it seems to send a redirect every other time:

Glens-MBP:s3 gmr$ curl -v "http://iiif.io/api/presentation/validator/service/validate?url=http://iiif.io/api/presentation/2.1/example/fixtures/1/manifest.json&version=2.1"
*   Trying 52.203.255.156...
* TCP_NODELAY set
* Connected to iiif.io (52.203.255.156) port 80 (#0)
> GET /api/presentation/validator/service/validate?url=http://iiif.io/api/presentation/2.1/example/fixtures/1/manifest.json&version=2.1 HTTP/1.1
> Host: iiif.io
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Access-Control-Allow-Headers: Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token
< Access-Control-Allow-Methods: GET,POST,OPTIONS
< Access-Control-Allow-Origin: *
< Allow: GET,POST,OPTIONS
< Content-Type: application/json
< Date: Thu, 28 Jun 2018 12:50:48 GMT
< Server: nginx/1.12.1
< X-UA-Compatible: IE=Edge,chrome=1
< Content-Length: 1711
< Connection: keep-alive
< 
* Connection #0 to host iiif.io left intact
{"error": "None", "warnings": ["The remote server did not use the requested gzip transfer compression, which will slow access. (Content-Encoding: )", "WARNING: Resource type 'sc:Manifest' should have 'description' set\n", "WARNING: Resource type 'oa:Annotation' should have '@id' set\n", "WARNING: Resource type 'dctypes:Image' should have 'format' set\n"], "url": "http://iiif.io/api/presentation/2.1/example/fixtures/1/manifest.json", "okay": 1, "received": "{\n  \"@context\": \"http://iiif.io/api/presentation/2/context.json\", \n  \"@id\": \"http://iiif.io/api/presentation/2.1/example/fixtures/1/manifest.json\", \n  \"@type\": \"sc:Manifest\", \n  \"label\": \"Test 1 Manifest: Minimum Required Fields\", \n  \"within\": \"http://iiif.io/api/presentation/2.1/example/fixtures/collection.json\", \n  \"sequences\": [\n    {\n      \"@type\": \"sc:Sequence\", \n      \"canvases\": [\n        {\n          \"@id\": \"http://iiif.io/api/presentation/2.1/example/fixtures/canvas/1/c1.json\", \n          \"@type\": \"sc:Canvas\", \n          \"label\": \"Test 1 Canvas: 1\", \n          \"height\": 1800, \n          \"width\": 1200, \n          \"images\": [\n            {\n              \"@type\": \"oa:Annotation\", \n              \"motivation\": \"sc:painting\", \n              \"resource\": {\n                \"@id\": \"http://iiif.io/api/presentation/2.1/example/fixtures/resources/page1-full.png\", \n                \"@type\": \"dctypes:Image\", \n                \"height\": 1800, \n                \"width\": 1200\n              }, \n              \"on\": \"http://iiif.io/api/presentation/2.1/example/fixtures/canvas/1/c1.json\"\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}"}Glens-MBP:s3 gmr$ 
Glens-MBP:s3 gmr$ curl -v "http://iiif.io/api/presentation/validator/service/validate?url=http://iiif.io/api/presentation/2.1/example/fixtures/1/manifest.json&version=2.1"
*   Trying 52.203.255.156...
* TCP_NODELAY set
* Connected to iiif.io (52.203.255.156) port 80 (#0)
> GET /api/presentation/validator/service/validate?url=http://iiif.io/api/presentation/2.1/example/fixtures/1/manifest.json&version=2.1 HTTP/1.1
> Host: iiif.io
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Content-Type: text/html
< Date: Thu, 28 Jun 2018 12:50:53 GMT
< Location: http://iiif.io/api/presentation/validator/service/validate/?url=http://iiif.io/api/presentation/2.1/example/fixtures/1/manifest.json&version=2.1
< Server: nginx/1.12.1
< X-UA-Compatible: IE=Edge,chrome=1
< Content-Length: 191
< Connection: keep-alive
< 
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>openresty/1.13.6.1</center>
</body>
</html>
* Connection #0 to host iiif.io left intact

Can't trace where this redirect is happening but suspect its nginx trying to be helpful. Made a change to the proxy to so that it can handle both a slash and not. See

IIIF/iiif-reverse-proxy-app@a486c35