Broken Accept-header handling to fetch ActivityPub data
Post by p@FSE detailing it: https://freespeechextremist.com/objects/66c80e12-8828-4e8f-8e83-0b606019190c
Relevant part copied:
Correct behavior
-
Accept: application/json
returns JSON -
Accept: application/ld+json
returns JSON -
Accept: application/activity+json
returns JSON -
Accept: application/activity+json;q=0.9, text/html;q=0.1
returns JSON -
Accept: application/activity+json;q=0.1, text/html;q=0.9
results in an attempt to load the webapp
Incorrect behavior
-
Accept: application/json, */*
results in an attempt to load the webapp -
Accept: application/activity+json;q=0.9, */*;q=0.1
results in an attempt to load the webapp -
Accept: application/*
results in a 302
Wouldn't be surprised that the relevant code to fix is the Phoenix Framework or one of it's dependencies
Edited by Haelwenn