presentation-validator icon indicating copy to clipboard operation
presentation-validator copied to clipboard

New: Add 'accept' header option on validator

Open ahankinson opened this issue 5 years ago • 4 comments

For IIIF services that provide both v2 and v3 manifests at the same URL, the validator needs to send an appropriate 'accept' header to ensure it is returning the appropriate IIIF version response.

This PR adds a checkbox to the validator to optionally include an 'Accept' header in the request. The header is set according to the selected IIIF version, which makes it possible to request v3 manifests from a 'default' v2 service, or vice-versa.

ahankinson avatar Jan 30 '20 18:01 ahankinson

Coverage Status

Coverage decreased (-0.8%) to 81.752% when pulling 3412b7e6266f2aeb6b51589d022f5c294b4abbd5 on bodleian:add-accept-header into bd49884cfe42fbd83b8b2fe0dba88c71372c69b8 on IIIF:master.

coveralls avatar Jan 30 '20 18:01 coveralls

I think the CI failure is during installation for Python 2.7, and not because of this change.

ahankinson avatar Jan 31 '20 10:01 ahankinson

Thanks Andrew, I’ll have a proper look but I think the python 2.7 issue is due to the version of Pillow. I’ve got a fix in a branch I’m working on to improve the error messages and I’ll merge that first before this so the fix is in the master branch.

glenrobson avatar Jan 31 '20 10:01 glenrobson

I just noticed that this would fix #74 as well

ahankinson avatar Jan 31 '20 17:01 ahankinson