summaryrefslogtreecommitdiff
path: root/internal/transport/finger.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/transport/finger.go')
-rw-r--r--internal/transport/finger.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/transport/finger.go b/internal/transport/finger.go
index 4c3cacd7d..f106019b5 100644
--- a/internal/transport/finger.go
+++ b/internal/transport/finger.go
@@ -59,8 +59,10 @@ func prepWebfingerReq(ctx context.Context, loc, domain, username string) (*http.
value := url.QueryEscape("acct:" + username + "@" + domain)
req.URL.RawQuery = "resource=" + value
+ // Prefer application/jrd+json, fall back to application/json.
+ // See https://www.rfc-editor.org/rfc/rfc7033#section-10.2.
+ req.Header.Add("Accept", string(apiutil.AppJRDJSON))
req.Header.Add("Accept", string(apiutil.AppJSON))
- req.Header.Add("Accept", "application/jrd+json")
req.Header.Set("Host", req.URL.Host)
return req, nil