~tsileo/microblog.pub#156: 
microblog.pub replying with HTML data when JSON expected

While debugging communication problems between flohmarkt and microblog.pub I found that microblog.pub didn't respond to a request for the profile by flohmarkt with a JSON response:

~$ curl -s -D - "https://chrichri.ween.de" -H "Content-type": "application/json" -H "Accept: application/json,application/ld+json,application/activity+json" | head -n20 | cut -c-100
HTTP/2 200
server: nginx
date: Tue, 06 Feb 2024 18:54:46 GMT
content-type: text/html; charset=utf-8
content-length: 60863
x-sso-wat: You've just been SSOed
x-request-id: 304085d481f976a2
x-powered-by: microblogpub
referrer-policy: no-referrer, strict-origin-when-cross-origin
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
permissions-policy: interest-cohort=()
content-security-policy: upgrade-insecure-requests
strict-transport-security: max-age=63072000; includeSubDomains; preload
x-download-options: noopen
x-permitted-cross-domain-policies: none

<!DOCTYPE HTML>
<html lang="en">

Altering the order of the "Accept:"-headers content did the change the behaviour and microblog.pub responds with a JSON reply:

~$ curl -s -D - "https://chrichri.ween.de" -H "Content-type": "application/json" -H "Accept: application/ld+json,application/activity+json,application/json" | head -n20 | cut -c-100
HTTP/2 200
server: nginx
date: Tue, 06 Feb 2024 18:54:56 GMT
content-type: application/activity+json
content-length: 3264
x-sso-wat: You've just been SSOed
x-request-id: 82f90ad839df24e1
x-powered-by: microblogpub
referrer-policy: no-referrer, strict-origin-when-cross-origin
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
permissions-policy: interest-cohort=()
content-security-policy: upgrade-insecure-requests
strict-transport-security: max-age=63072000; includeSubDomains; preload
x-download-options: noopen
x-permitted-cross-domain-policies: none

{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1",{"Hashtag":"as:H

I'm not that deep into ActivityPub to say how this actually should work by the protocol definition, but it seems odd to me that microblog.pub responds with HTML content at all to a request like the first one above.

My microblog.pub is running on a yunohost - if this makes a difference.

Status
REPORTED
Submitter
~chrichri
Assigned to
No-one
Submitted
20 days ago
Updated
20 days ago
Labels
No labels applied.