change finger accept type to yet another mime

This commit is contained in:
Ted Unangst 2019-04-15 10:27:36 -04:00
parent 7b12715d1e
commit 1fb1523f54
1 changed files with 5 additions and 1 deletions

View File

@ -119,7 +119,11 @@ func GetJunk(url string) (map[string]interface{}, error) {
if err != nil { if err != nil {
return nil, err 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") req.Header.Set("Accept-Encoding", "gzip")
resp, err := client.Do(req) resp, err := client.Do(req)
if err != nil { if err != nil {