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

2.1.1 content negotiation failure — backcheck? #23

Open
julianlam opened this issue Oct 24, 2024 · 1 comment
Open

2.1.1 content negotiation failure — backcheck? #23

julianlam opened this issue Oct 24, 2024 · 1 comment

Comments

@julianlam
Copy link

julianlam commented Oct 24, 2024

A more difficult failure mode to detect arises when the server does not support ActivityPub, but does support content negotiation for another JSON format. Such a server returns a 200 OK status code with a JSON object that does not use JSON-LD, or JSON-LD object that does not use the Activity Streams 2.0 vocabulary...

If one sends Accept: application/activity+json and received JSON back, you're right that you don't know whether it's JSON-LD. You could theoretically backcheck this by checking the received Content-Type.

I would assume compliant AP implementations would send the appropriate header, but more importantly, I can absolutely rely on non-compliant implementations to not send the appropriate header back.

@evanp
Copy link
Collaborator

evanp commented Nov 8, 2024

I think it's more of a situation when you use more general JSON types, like this:

GET /resource HTTP/1.1
Host: mixed.example
Accept: application/activity+json, application/ld+json, application/json

I'll update the failure mode to be more clear that it's only when you accept non-AS2 JSON media types that compliant servers might not return AS2.

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

No branches or pull requests

2 participants