-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
irIIIFService will attempt to reencode a Fedora URI that is already encdoded #149
Comments
Just a note that it looks like the RDF spec requires that URIs are encoded so this is almost certainly something Fedora is doing when a new resource is minted. For that reason, I don't see why irIIIFService would even need to encode these bits to begin with. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
In some cases, irIIIFService will try to request a Fedora resource by encoding parts of a URI from Fedora that has already been encoded. This causes irIIIFService to fail to request the RDF resource with a 404 and results in the Manifest not generating.
To Reproduce
Steps to reproduce the behavior:
Manifest
in thisCollection
: https://api-pre.library.tamu.edu/iiif-service/fedora/collection/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/basbanes-exhibit-texts-20240924https://api-pre.library.tamu.edu/iiif-service/fedora/presentation/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/basbanes-exhibit-texts-20240924_objects/17
RDF not found! https://api-pre.library.tamu.edu/fcrepo/rest/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/basbanes-exhibit-texts-20240924_objects/17/pages/page_0/files/blumberg-holiday%20card_1.jpg/fcr:metadata
, but that URL resolves to a200
. Hmmmmm. 🤔o.s.web.client.RestTemplate : HTTP GET [https://api-pre.library.tamu.edu/fcrepo/rest/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/basbanes-exhibit-texts-20240924_objects/17/pages/page_0/files/blumberg-holiday%2520card_1.jpg/fcr:metadata](https://api-pre.library.tamu.edu/fcrepo/rest/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/basbanes-exhibit-texts-20240924_objects/17/pages/page_0/files/blumberg-holiday%2520card_1.jpg/fcr:metadata) 2024-09-27 14:07:46.864 DEBUG 1 --- [nio-8080-exec-4] o.s.web.client.RestTemplate : Accept=[text/plain, application/json, application/*+json, */*] 2024-09-27 14:07:46.898 DEBUG 1 --- [nio-8080-exec-4] o.s.web.client.RestTemplate : Response 404 NOT_FOUND 2024-09-27 14:07:46.899 ERROR 1 --- [nio-8080-exec-4]
blumberg-holiday%2520card_1.jpg
. In Fedora, it isblumberg-holiday%20card_1.jpg
, and on disk it wasblumberg-holiday card_1.jpg
. In other words, we have a file with spaces, Fedora (or MAGPIE) encodes the space as%20
, and then irIIIFService thinks the%
needs be encoded as%25
, and we end up with%2520
.Expected behavior
irIIIFService attempts to determine if a resource uri is already encoded instead of reencoding.
Screenshots
Full trace back:
Additional context
A couple of things worth thinking about:
The text was updated successfully, but these errors were encountered: