change finger accept type to yet another mime
Ted Unangst tedu@tedunangst.com
Mon, 15 Apr 2019 10:27:36 -0400
1 files changed,
5 insertions(+),
1 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -119,7 +119,11 @@ req, err := http.NewRequest("GET", url, nil)
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 {