Skip to content

Discrepancy on equivalence of activity+json (SHOULD/MAY/SHOULD) #570

@trwnh

Description

@trwnh

Context

AP Section 3.2:

[Servers] MUST present the ActivityStreams object representation in response to application/ld+json; profile="https://www.w3.org/ns/activitystreams", and SHOULD also present the ActivityStreams representation in response to application/activity+json as well. The client MUST specify an Accept header with the application/ld+json; profile="https://www.w3.org/ns/activitystreams" media type in order to retrieve the activity.

AP Section 6:

[Clients] MUST make an HTTP POST request to [the actor's outbox] URL with the Content-Type of application/ld+json; profile="https://www.w3.org/ns/activitystreams". Servers MAY interpret a Content-Type or Accept header of application/activity+json as equivalent to application/ld+json; profile="https://www.w3.org/ns/activitystreams" for client-to-server interactions.

AP Section 7:

POST requests (eg. to the inbox) MUST be made with a Content-Type of application/ld+json; profile="https://www.w3.org/ns/activitystreams" and GET requests (see also 3.2 Retrieving objects) with an Accept header of application/ld+json; profile="https://www.w3.org/ns/activitystreams". Servers SHOULD interpret a Content-Type or Accept header of application/activity+json as equivalent to application/ld+json; profile="https://www.w3.org/ns/activitystreams" for server-to-server interactions.

Issue description

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.

  • retrieving objects: SHOULD
  • c2s/outbox interactions: MAY
  • s2s/inbox interactions: SHOULD

I can't think of a good reason why there would be a discrepancy. Maybe someone else can think of one?

Split issues

Recommended actions

This issue would benefit from being considered alongside the split issues, but perhaps minimally could be solved by considering whether that MAY should actually be a SHOULD. (There are larger questions about whether the equivalence actually holds and in which circumstances, but the split issues go into more detail there.)

Metadata

Metadata

Assignees

Labels

Next versionNormative change, requires new version of spec

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions