From 1fb1523f544d2d548255439522812bfc3f983124 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Mon, 15 Apr 2019 10:27:36 -0400 Subject: [PATCH] change finger accept type to yet another mime --- activity.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/activity.go b/activity.go index 91ef29a..3462b9f 100644 --- a/activity.go +++ b/activity.go @@ -119,7 +119,11 @@ func GetJunk(url string) (map[string]interface{}, error) { if err != nil { return nil, err } - req.Header.Set("Accept", theonetruename) + at := theonetruename + if strings.Contains(url, ".well-known/webfinger?resource") { + at = "application/jrd+json" + } + req.Header.Set("Accept", at) req.Header.Set("Accept-Encoding", "gzip") resp, err := client.Do(req) if err != nil {