Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load actor document, html returned for any Accept: request #106

Closed
redmatrix opened this issue Jun 30, 2018 · 4 comments
Closed

Unable to load actor document, html returned for any Accept: request #106

redmatrix opened this issue Jun 30, 2018 · 4 comments
Assignees

Comments

@redmatrix
Copy link

@redmatrix redmatrix commented Jun 30, 2018

I've made a request for the ActivityPub actor document (discovered in one of the current issues)

https://baptiste.gelez.xyz/@/kaniini/

Using this HTTP Accept header:

Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams", application/ld+json;profile="https://www.w3.org/ns/activitystreams", application/activity+json, application/ld+json

This header works for every AP/ActivityStreams installation I've tested against previously. The second variant is for sites that don't have a space between the mimetype and the profile; which I've found can be problematic.

I've tried several variations and in all cases a text/html document is returned, even though that is not permitted by the Accept header. (Should return 406 if I recall correctly). But what I would really like to see returned is an ActivityPub actor document and not certain how to do that given that the Accept header isn't being honoured. It isn't application specific (I'm using hubzilla and red); but also occurs if one uses this Accept header in a browser using the browser developer tools. I've also added application/json to the header and see nothing different. I've also tried without the trailing slash in the URL.

How can I obtain an ActivityPub actor document?

@fdb-hiroshima

This comment has been minimized.

Copy link
Member

@fdb-hiroshima fdb-hiroshima commented Jul 1, 2018

We are matching against application/activity+json, however it seems it need to be the first type proposed for it to work (also specifying no Accept header load the actor, but I don't think it can be relied on in the future). We should probably search for a way to work with such Accept header containing more than one content type.

@AnaGelez

This comment has been minimized.

Copy link
Member

@AnaGelez AnaGelez commented Jul 1, 2018

Matching the AP route when there is more than one content type is probably a Rocket issue, as it does all the routing.

@redmatrix

This comment has been minimized.

Copy link
Author

@redmatrix redmatrix commented Jul 1, 2018

Thanks. application/activity+json is legal for ActivityStreams but not ActivityPub, which required an Accept type of

application/ld+json; profile="https://www.w3.org/ns/activitystreams"

last time I looked (7-8 months ago). This isn't a show-stopper today but may be an issue going forward, as I'm working on a suite of products/projects which are ActivityStreams compliant but not ActivityPub compliant and will provide completely different content if you choose the wrong one first.

@AnaGelez AnaGelez self-assigned this Jul 11, 2018
@AnaGelez

This comment has been minimized.

Copy link
Member

@AnaGelez AnaGelez commented Jul 11, 2018

Fixed in b95e384

@AnaGelez AnaGelez closed this Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.