Skip to content

Requirements on Accept / Content-Type should be loosened to account for non-LD use #571

@trwnh

Description

@trwnh

Background: application/activity+json vs application/ld+json in AS2-Core vs AP

I wasn't sure whether to file this in https://github.com/w3c/activitystreams or https://github.com/w3c/activitypub, but I'm filing it here in ActivityPub because of implications of the specific wording used in ActivityPub but not ActivityStreams. It is an issue that otherwise might also apply to ActivityStreams, depending on certain conditions. (EDIT: I've split out w3c/activitystreams#684 at least.)

So AS2-Core says that an AS2 document is application/activity+json, but you SHOULD treat ld+json with the activitystreams profile as equivalent. But AP requires that clients MUST use ld+json with the activitystreams profile, and servers aren't required to respond to requests for application/activity+json (even though they SHOULD -- and in the case of the outbox this is even downgraded to a MAY for seemingly no reason -- see #570 for more).

In practice, implementations that use "extension" terms have varying levels of support for including additional term definitions, and signaling the additional semantics might not be done at all. So we end up in a situation where some clients have extra knowledge, but some clients don't, and thus they can't safely use the same representation anymore. But they can't reliably negotiate this because the requirements that AP places on the Accept and Content-Type headers are too strict. Saying that you MUST use ld+json even when you don't understand ld+json is flawed when you should be able to negotiate for activity+json without the implications of ld+json.

Recommended actions

Related issues:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions