Mobilizon uses wrong content-type
Description
I noticed I can't federate with Mobilizon from Pleroma. I do curl -v 'https://demo.mobilizon.org/events/1d9c0468-3e6c-4886-8bbb-5ae3697a27b3' -H 'Content-Type: application/json; charset=utf-8' -H 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
. If I read correctly, this means the content-type that Mobilizon returns is content-type: application/json; charset=utf-8
.
This should be either application/activity+json
or application/ld+json; profile="https://www.w3.org/ns/activitystreams"
. (Afaict Pleroma, Mastodon and Pixelfed all use application/activity+json
.)
Relevant specifications:
https://www.w3.org/TR/activitypub/#server-to-server-interactions
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.
https://www.w3.org/TR/activitypub/#retrieving-objects
but 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.
And to be complete: https://www.rfc-editor.org/rfc/rfc7231#section-5.3.2
The "Accept" header field can be used by user agents to specify response media types that are acceptable. Accept header fields can be used to indicate that the request is specifically limited to a small set of desired types, as in the case of a request for an in-line image.
Steps to Reproduce
- do
curl -v 'https://demo.mobilizon.org/events/1d9c0468-3e6c-4886-8bbb-5ae3697a27b3' -H 'Content-Type: application/json; charset=utf-8' -H 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
- Check the
< content-type:
Expected behaviour:
It's either application/activity+json
or application/ld+json; profile="https://www.w3.org/ns/activitystreams"
Actual behaviour:
It's application/ld+json; charset=utf-8
Reproduces how often:
Always
Versions
This was tested on https://demo.mobilizon.org/
Version: 3.0.0-rc.3
Using curl 7.81.0 (x86_64-pc-linux-gnu)
Additional Information
I use an example event here, but assume this is true for other AP objects being fetched.