Open Knurg opened 4 years ago
OK, I've committed a fix that should solve your problem - it was just an issue with the % symbol and printf(). Let me know if this works for you
Thanks for the fix. The info.json works well now: https://tafelmalerei.gnm.de/fcgi-bin/iipsrv.fcgi?IIIF=/srv/www/htdocs/sites/default/files/styles/wisski_pyramid/public/2018-07/Gm1161%252B1187_XR_WissKI.tif/info.json But in there it refers to: https://tafelmalerei.gnm.de/fcgi-bin/iipsrv.fcgi?IIIF=/srv/www/htdocs/sites/default/files/styles/wisski_pyramid/public/2018-07/Gm1161%2B1187_XR_WissKI.tif And this fails the loads for mirador as a consequence - it would have to be https://tafelmalerei.gnm.de/fcgi-bin/iipsrv.fcgi?IIIF=/srv/www/htdocs/sites/default/files/styles/wisski_pyramid/public/2018-07/Gm1161%252B1187_XR_WissKI.tif Best Mark
Am Fr., 6. März 2020 um 15:40 Uhr schrieb Ruven notifications@github.com:
OK, I've committed a fix that should solve your problem - it was just an issue with the % symbol and printf(). Let me know if this works for you
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ruven/iipsrv/issues/195?email_source=notifications&email_token=AAE6OFWK3STJ46LRZUTHIQDRGEDMJA5CNFSM4LC7MWL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOBSI7I#issuecomment-595797117, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE6OFTPIUF4AVA36NYJK23RGEDMJANCNFSM4LC7MWLQ .
The @id parameter within info.json should be URI-encoded according to the IIIF specification https://iiif.io/api/image/2.1/#technical-properties and https://iiif.io/api/image/2.1/#uri-syntax where it specifically states that for the file identifier "Special characters must be URI encoded". So, it looks like the + symbol in your file name should be encoded just once within the info.json file to %2B.
Is this only a problem with Mirador or do other viewers have problems with this?
I am unsure if it is not more or less a problem of iip.
Example: https://tafelmalerei.gnm.de/wisski/navigate/47/view
Here you can see the manifest - everything is double escaped with %252B: https://tafelmalerei.gnm.de/wisski/navigate/47/iiif_manifest
Here is the info.json: https://tafelmalerei.gnm.de/fcgi-bin/iipsrv.fcgi?IIIF=/srv/www/htdocs/sites/default/files/styles/wisski_pyramid/public/2018-07/Gm1161%252B1187_XR_WissKI.tif/info.json
As you can see: Every url is double encoded, but somehow the id in the info.json is not. I guess it should be - why does it skip the encoding here?
If you have a look at the javascript console at https://tafelmalerei.gnm.de/wisski/navigate/47/view you can see what mirador tries to find - it exactly uses the URL from the info.json-file and seems to expand from there on. I don't know if this is good/valid - but it breaks the viewer from there on.
Best
Mark
Am Mo., 9. März 2020 um 13:35 Uhr schrieb Ruven notifications@github.com:
The @id https://github.com/id parameter within info.json should be URI-encoded according to the IIIF specification https://iiif.io/api/image/2.1/#technical-properties and https://iiif.io/api/image/2.1/#uri-syntax where it specifically states that for the file identifier "Special characters must be URI encoded". So, it looks like the + symbol in your file name should be encoded just once within the info.json file to %2B.
Is this only a problem with Mirador or do other viewers have problems with this?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ruven/iipsrv/issues/195?email_source=notifications&email_token=AAE6OFQB2LR3ASAQCST6YNTRGTO7VA5CNFSM4LC7MWL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOG5XMI#issuecomment-596499377, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE6OFW4RBKFPUPSQTNRQ7LRGTO7VANCNFSM4LC7MWLQ .
OK, so either Mirador is doing something wrong and should URI-encode the @id string or IIPImage is doing it wrong and should work with singly-encoded, not double-encoded URI's.
Hmmm, I'll have to look into this further and get back to you. We should check how other viewers handle this. Indeed, I'll have to look at why and whether it's necessary for IIPImage to use double-encoding ...
I've still some problems with + in filenames and IIIF:
I have a file "Gm1161+1187_XR_WissKI.tif" in my cms that I want to get via iip-srv.
Initially I started by fetching from https://tafelmalerei.gnm.de/fcgi-bin/iipsrv.fcgi?IIIF=/srv/www/htdocs/sites/default/files/styles/wisski_pyramid/public/2018-07/Gm1161+1187_XR_WissKI.tif/full/full/0/default.jpg which gave me a:
So i fiddled around a bit - single-encoding did not work, but double-encoding does, so I get the image when I query: https://tafelmalerei.gnm.de/fcgi-bin/iipsrv.fcgi?IIIF=/srv/www/htdocs/sites/default/files/styles/wisski_pyramid/public/2018-07/Gm1161%252B1187_XR_WissKI.tif/full/full/0/default.jpg
However if I query the info.json via https://tafelmalerei.gnm.de/fcgi-bin/iipsrv.fcgi?IIIF=/srv/www/htdocs/sites/default/files/styles/wisski_pyramid/public/2018-07/Gm1161%252B1187_XR_WissKI.tif/info.json I get a json file which is corrupted:
Can we do something about that? I have a fresh compiled iipsrv in the most recent version.