Skip to content

docs: fix manifest path and filesystem scheme in serve.md#109

Open
lovrozitnik wants to merge 1 commit intoreadium:developfrom
lovrozitnik:fix-serve-docs-webpub-prefix
Open

docs: fix manifest path and filesystem scheme in serve.md#109
lovrozitnik wants to merge 1 commit intoreadium:developfrom
lovrozitnik:fix-serve-docs-webpub-prefix

Conversation

@lovrozitnik
Copy link
Copy Markdown

Fix manifest URL path and filesystem scheme documentation in serve.md

Summary

The documented manifest path doesn't match the route registered in the v0.6.6 binary. This PR corrects three related issues in docs/serve.md:

  1. The manifest path is /webpub/{base64url}/manifest.json, not /{base64url}/manifest.json.
  2. The HTTPS example URL was missing the /webpub/ prefix.
  3. The Filesystem row in the URI scheme table incorrectly stated that file:// is used; v0.6.6 accepts only a bare relative path with no URI prefix.

Changes

  • Added /webpub/ prefix to the manifest path description.
  • Added /webpub/ to the HTTPS example URL.
  • Updated the Filesystem row in the URI scheme table: URI scheme is (none), path is used directly without a prefix.
  • Added a dedicated filesystem example matching the new URL shape.
  • Noted that base64url encoding is without padding (confirmed by testing — padded variants do not match the route).

Verification

Tested against readium v0.6.6 (go-toolkit v0.13.4) on Linux x86_64, serving a local EPUB:

sudo -u www-data /usr/local/bin/readium serve \
  --file-directory /srv/epubs \
  --port 8443 --debug

Working request:

$ echo -n "9789612981303.epub" | basenc --base64url | tr -d '='
OTc4OTYxMjk4MTMwMy5lcHVi

$ curl -s http://localhost:8443/webpub/OTc4OTYxMjk4MTMwMy5lcHVi/manifest.json | head -c 120
{"@context":"https://readium.org/webpub-manifest/context.jsonld","links":[{"href":"~readium/positions.json",...

Without the /webpub/ prefix, requests return 404. Passing a file://-prefixed path to the filesystem scheme produces an error (the decoded path is concatenated onto --file-directory rather than parsed as a URI), confirming file:// is not supported for the filesystem scheme in the released binary.

Out of scope (separate issues to be filed)

  • /list.json endpoint does not appear in the v0.6.6 binary (confirmed via strings); may be a regression or develop-only feature.
  • --debug produces no per-request logging, making 404/500 troubleshooting difficult.
  • Passing a file:// URI to the filesystem scheme produces a confusing path-concatenation error rather than a clear "URI scheme not supported" message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant