Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Fix broken server if a publication file contains special characters #306

Merged
merged 1 commit into from
May 7, 2020

Conversation

mickael-menu
Copy link
Member

Fix readium/kotlin-toolkit#243

The web server was broken if the publication filename contained special characters, e.g. 9+Chemins+Nocturnes+%28Viviane+Hamy%29 copy.epub. This is fixed by percent-encoding the filename.

We should use the self link in Publication for the base URL, but unfortunately this doesn't work right now without breaking reading apps, because the Publication is serialized before adding the self link when serving it in the Server. For now, I added Publication::localBaseUrlOf() and Publication::localUrlOf() to centralize the sanitization code in a single place, until we fix the self link issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server is broken if the publication file contains special characters
1 participant