clarin-eric / VirtualCollectionRegistry

Virtual Collection Registry (VCR)
GNU General Public License v3.0
2 stars 0 forks source link

Validation on the submit endpoint seems to fail for valid references #45

Closed WillemElbers closed 5 years ago

WillemElbers commented 5 years ago

Valid references appear to fail when submitting collections via the submission API

test endpoint: http://localhost:8080/vcr/test_vc_submission.html

WillemElbers commented 5 years ago

Seems to be working for manual tests and vlo search: https://alpha-vlo.clarin.eu/?4&q=Nijmegen+AND+spoken+AND+soundbites

WillemElbers commented 5 years ago

Problematic handle value: https://hdl.handle.net/10744/a8f5c347-7a75-4b0e-9563-ef57c3d613df

WillemElbers commented 5 years ago

So the handle 10744/a8f5c347-7a75-4b0e-9563-ef57c3d613df resolves to https://www.meertens.knaw.nl/flat/objects/lat:10744_a8f5c347_7a75_4b0e_9563_ef57c3d613df/datastreams/CMD/content\?asOfDateTime\=2017-01-27T11:30:42.276.

This endpoint returns a valid HTTP 302 response if you send the Accept: text/html header, and an HTTP 404 if you don't send this header. The VCR validation does not (and should not) send this header and thus fails validation.

Curl examples:

Failing:

curl -v https://www.meertens.knaw.nl/flat/objects/lat:10744_a8f5c347_7a75_4b0e_9563_ef57c3d613df/datastreams/CMD/content\?asOfDateTime\=2017-01-27T11:30:42.276

Working:

curl -v -H "Accept: text/html" https://www.meertens.knaw.nl/flat/objects/lat:10744_a8f5c347_7a75_4b0e_9563_ef57c3d613df/datastreams/CMD/content\?asOfDateTime\=2017-01-27T11:30:42.276