Pleroma serves text/html rather than ActivityPub json
Context
Mastodon performs most GET requests with application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", text/html
as value for the Accept
header. This is to cope with software having HTML and ActivityPub representations on different URLs, and for some reason the HTML representation being fetched first (I don't know if this is still a relevant use case).
See: https://github.com/tootsuite/mastodon/issues/12794
Issue
On at least the mentioned instance, trying to fetch a status with the Accept: application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", text/html
header returns a redirection with an HTML content, while leaving the text/html
part out gives the expected ActivityPub JSON output. Specifying a low quality value for text/html
(`text/html;q=0.1) does not help.