openzim / openzim/cms

URL is incorrect

Open
#300 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug question
Dominant language
Python
Stars
7
Forks
1
Avg merge
15h 20m
Merged PRs (30d)
18

Description

The CMS is currently adding a .meta4 suffix to URL

https://github.com/openzim/cms/blob/4f0bf5fec59eb39122ea3ef797ad53775b34eaa1/backend/src/cms_backend/api/routes/utils.py#L50-L54

This has been done to replicate the previous behavior which goal is to provide access to Metalink response containing the mirrors list and additional details.

The problem is that Kiwix Library XML url attribute on <book/> should be a ZIM URL as it feeds the <link type="application/x-zim" /> node on the OPDS.

Adding this .meta4 suffix thus has the effect that OPDS lies in its response because the link target is not a ZIM.


⚠️ DO NOT ACT UPON ATM

This ticket is just to record the problem and the CMS happens to be at the source of it by following our own decision.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read backend/src/cms_backend/api/routes/utils.py at lines 50-54 and trace how the generated URL becomes the Kiwix Library XML and OPDS link. Confirm the expected behavior for Metalink responses with maintainers before changing anything; done means the XML url points to a ZIM rather than a .meta4 resource, with the agreed behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.