-
Notifications
You must be signed in to change notification settings - Fork 63
Restore requirement that relative URLs resolve to resources #2028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…trings resolve to resources in the OCF Abstract Container
|
The issue was discussed in a meeting on 2022-03-03 List of resolutions:
View the transcript3. Clarify that resources must be present for relative paths (issue epub-specs#2024)See github issue epub-specs#2024. Dave Cramer: Our other issue is similar. When we did this we lost a requirement that there be a resource at the end of the path. See github pull request epub-specs#2028. Dave Cramer: We lost part 2. We should put it back. There is already a PR. Matt Garrish: We just need to put the existence text back. Dave Cramer: Yes, and it sounds like the PR does just that. Dan Lazin: I don't know if it follows that there must always be a thing that is referenced. Wendy Reid: Going with must on this, because nothing stops people from ignoring epubcheck. Matt Garrish: I basically agree with wendyreid. Dan Lazin: Those are persuasive arguments. Wendy Reid: Errors scare them more. Dan Lazin: I am ok with must, but odd that epubcheck is preflight and a conformance checker.
Dave Cramer: Propose merging 2028.
Dave Cramer: AOB?. |
|
@rdeltour I'm wondering if this wording doesn't really work? The algorithm for determining if you have a valid-relative-container-URL-with-fragment string gives you a true or false value in return, not a URL that you can use to check if a resource exists at the location. A simple check of the string as relative path could leak back outside the container. |
Yeah, what "resolve" means for a URL string is not strictly defined. Alternatively, we could use something along the lines of what I proposed back in #1888 (comment):
or more precisely:
although it is a bit of a mouthful 🤔 |
Ya, that's a tough read! But what is a container URL? We don't define that in the spec, unless I'm missing something (the link doesn't go anywhere). |
Sorry I copied that from the old proposal 🤦♂️. We now define this as Content URL. |
|
I've updated the PR with the first proposed text. I'm hoping the reference to parsing is enough, and we don't have to get into the details of resolving base URLs... 😄 |
…to fix/issue-2024 # Conflicts: # epub33/core/index.html
I've added a requirement that valid-relative-container-URL-with-fragment strings resolve to resources in the OCF Abstract Container to the end of 6.1.5.
Fixes #2024
Preview | Diff