diff options
author | 2024-01-22 15:33:01 +0100 | |
---|---|---|
committer | 2024-01-22 14:33:01 +0000 | |
commit | 9d80f7fd68c5a1c243f1d90a05d8fec028f1c9e8 (patch) | |
tree | 4a17c7a92801bc06f6ea09f5b8fca0926cf2ba3d /internal/federation/federatingactor_test.go | |
parent | [docs] use latest cavage link for http signatures (#2565) (diff) | |
download | gotosocial-9d80f7fd68c5a1c243f1d90a05d8fec028f1c9e8.tar.xz |
[feature] Allow "charset=utf8" in incoming AP POST requests (#2564)
* [feature] Allow "charset=utf8" in incoming AP POST requests
* changed my mind
* document POSTing to a GtS inbox
* correct link
Diffstat (limited to 'internal/federation/federatingactor_test.go')
-rw-r--r-- | internal/federation/federatingactor_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/internal/federation/federatingactor_test.go b/internal/federation/federatingactor_test.go index 348d501d6..d07b56537 100644 --- a/internal/federation/federatingactor_test.go +++ b/internal/federation/federatingactor_test.go @@ -165,6 +165,22 @@ func TestIsASMediaType(t *testing.T) { Expect: true, }, { + Input: "application/activity+json; charset=utf-8", + Expect: true, + }, + { + Input: "application/activity+json;charset=utf-8", + Expect: true, + }, + { + Input: "application/activity+json ;charset=utf-8", + Expect: true, + }, + { + Input: "application/activity+json ; charset=utf-8", + Expect: true, + }, + { Input: "application/ld+json;profile=https://www.w3.org/ns/activitystreams", Expect: true, }, @@ -196,6 +212,10 @@ func TestIsASMediaType(t *testing.T) { Input: "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"", Expect: true, }, + { + Input: "application/ld+json", + Expect: false, + }, } { if federation.IsASMediaType(test.Input) != test.Expect { t.Errorf("did not get expected result %v for input: %s", test.Expect, test.Input) |