aboutsummaryrefslogtreecommitdiff
path: root/activitypub/webfinger.go
diff options
context:
space:
mode:
Diffstat (limited to 'activitypub/webfinger.go')
-rw-r--r--activitypub/webfinger.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/activitypub/webfinger.go b/activitypub/webfinger.go
index 276a791..8dce506 100644
--- a/activitypub/webfinger.go
+++ b/activitypub/webfinger.go
@@ -122,20 +122,22 @@ func FingerRequest(actor string, instance string) (*http.Response, error) {
if len(finger.Links) > 0 {
for _, e := range finger.Links {
if e.Type == "application/activity+json" {
- req, err := http.NewRequest("GET", e.Href, nil)
+ req, err = http.NewRequest("GET", e.Href, nil)
if err != nil {
return resp, util.MakeError(err, "FingerRequest")
}
- req.Header.Set("Accept", config.ActivityStreams)
- resp, _ := util.RouteProxy(req)
-
- return resp, nil
+ break
}
}
}
+ req.Header.Set("Accept", config.ActivityStreams)
+ if resp, err = util.RouteProxy(req); err != nil {
+ return resp, util.MakeError(err, "FingerRequest")
+ }
+
return resp, nil
}