From 3db517715bef6a53225c5c3c06e8fc5fd0bf71e3 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sun, 24 Apr 2022 00:46:49 -0700 Subject: basic pass over view posts, post, catalog and manage page connections --- accept.go | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 accept.go (limited to 'accept.go') diff --git a/accept.go b/accept.go deleted file mode 100644 index 6a15857..0000000 --- a/accept.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - "regexp" - "strings" -) - -// False positive for application/ld+ld, application/activity+ld, application/json+json -var activityRegexp = regexp.MustCompile("application\\/(ld|json|activity)((\\+(ld|json))|$)") - -func acceptActivity(header string) bool { - accept := false - if strings.Contains(header, ";") { - split := strings.Split(header, ";") - accept = accept || activityRegexp.MatchString(split[0]) - accept = accept || strings.Contains(split[len(split)-1], "profile=\"https://www.w3.org/ns/activitystreams\"") - } else { - accept = accept || activityRegexp.MatchString(header) - } - return accept -} -- cgit v1.2.3