diff options
Diffstat (limited to 'internal/transport/finger.go')
-rw-r--r-- | internal/transport/finger.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/transport/finger.go b/internal/transport/finger.go index f106019b5..18b028a64 100644 --- a/internal/transport/finger.go +++ b/internal/transport/finger.go @@ -61,8 +61,11 @@ func prepWebfingerReq(ctx context.Context, loc, domain, username string) (*http. // 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)) + // + // Some implementations don't handle multiple accept headers properly, + // including Gin itself. So concat the accept header with a comma + // instead which seems to work reliably + req.Header.Add("Accept", string(apiutil.AppJRDJSON)+","+string(apiutil.AppJSON)) req.Header.Set("Host", req.URL.Host) return req, nil |