Closed JayPanoz closed 6 years ago
Mhmm, based on your feedback I am not sure what the bug is though.
URL must of course be encoded appropriately when passed as query string parameters into other URLs, especially with conflicting Base64 reserved characters.
See for example how EPUB demo URLs are encoded in the r2-streamer-js
basic online test interface:
https://readium2.herokuapp.com
(try using the childrens-literature.epub
and wasteland-otf-obf.epub
reader links)
PS: this is in fact a very common problem which we had to address in the Readium ("1") cloud/web reader.
For example Accessible EPUB3
which is "shipped" with the deployed instance of the cloud reader:
https://readium.firebaseapp.com/?epub=epub_content%2Faccessible_epub_3
(note the %2F
slash character)
...or even childrens-literature.epub
hosted at the r2-streamer-js
Heroku server:
OK so PEKBAC indeed.
Sorry for the inconvenience.
Long debugging short: the first screen with all publications has "=" aplenty e.g.
./pub/L1VzZXJzL0hlcnZlL3IyLXN0cmVhbWVyLWpzL21pc2MvZXB1YnMvTW9ieURpY2suZXB1Yg==
On the second screen i.e. publication specific:
?url=http%3A%2F%2Fwebsite%2Fpub%2FL1VzZXJzL0hlcnZlL3IyLXN0cmVhbWVyLWpzL21pc2MvZXB1YnMvTW9ieURpY2suZXB1Yg%3D%3D%2Fmanifest.json
Which is actually OK but for some reason we spent like 2 hours debugging that. Not that we’ve been silently assuming the first one could be used as is but we completely missed it. :-( Blame it on fatigue.
FYI we just had a bug with this one:
https://github.com/edrlab/r2-streamer-js/blob/b66d92e2c2a29ca31d252661deee9a0edeabc62f/misc/readers/reader-NYPL/index.html#L25-L39
as the streamer created a path64 path containing the "=" character and consequently split the path to the manifest.json.
So instead of
it returned