Skip to content
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

Issue with Step 6 of 9.4.1 LoadDocumentCallback #622

Open
multimeric opened this issue Nov 30, 2024 · 2 comments · May be fixed by #623
Open

Issue with Step 6 of 9.4.1 LoadDocumentCallback #622

multimeric opened this issue Nov 30, 2024 · 2 comments · May be fixed by #623

Comments

@multimeric
Copy link
Contributor

multimeric commented Nov 30, 2024

Current spec
Source code

Assume the ideal case, where that the server has responded with Content-Type: application/ld+json:

  • We skip step 4, since we have the +json suffix
  • We skip step 5, since application/ld+json is specifically excluded
  • Then, we reach step 6

Currently this is worded as:

"Otherwise, the retrieved document's Content-Type is neither application/json, application/ld+json, nor any other media type using a +json suffix as defined in [RFC6839]. Reject the promise passing a loading document failed error."

I think this is a mistake, and it should read as follows, because of course we do have application/ld+json:

"Otherwise, if the retrieved document's Content-Type is neither application/json, application/ld+json, nor any other media type using a +json suffix as defined in [RFC6839], reject the promise passing a loading document failed error."

This is almost certainly a mistake because step 7 proceeds with the algorithm, even though the current wording of step 6 implies that it will always fail here.

Happy to put in a PR here.

@TallTed
Copy link
Member

TallTed commented Dec 2, 2024

To make the above clearer, the suggested change is just to add an if following the Otherwise at the start of the sentence.

@gkellogg
Copy link
Member

gkellogg commented Dec 2, 2024

Yes, I think that "Otherwise, if ..." is appropriate for step 6, as it is intended to by pass this step for JSON documents.

@gkellogg gkellogg moved this to Errata in JSON-LD Management Dec 2, 2024
@multimeric multimeric linked a pull request Dec 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Errata
Development

Successfully merging a pull request may close this issue.

3 participants