diff options
author | Julio Capote <jcapote@gmail.com> | 2023-01-06 01:14:12 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2023-01-06 01:14:12 +0000 |
commit | bdbfe1a403c1fa144083e40ad9c28c611baa3e57 (patch) | |
tree | 2947635205d5642b71ac38d926c06f05c9ccf64f /registry | |
parent | cdf69178773c0fa82dbba20fee467c174cdcef9c (diff) | |
download | communique-bdbfe1a403c1fa144083e40ad9c28c611baa3e57.tar.gz |
try without content type
Diffstat (limited to '')
-rw-r--r-- | registry/registry.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/registry/registry.go b/registry/registry.go index ab2ece3..1decf77 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -272,7 +272,7 @@ func (r *Registry) deliverAcceptToInbox(url, actorUrl, actorKeyUrl *url.URL, fol request.Header.Add("Digest", "SHA-256="+digestHeader) request.Header.Add("Content-Type", "application/activity+json") - signedString := fmt.Sprintf("(request-target): post %s\ncontent-type: %s\ndate: %s\ndigest: %s\nhost: %s", url.Path, request.Header.Get("Content-Type"), date, digestHeader, url.Host) + signedString := fmt.Sprintf("(request-target): post %s\ndate: %s\ndigest: %s\nhost: %s", url.Path, date, digestHeader, url.Host) r.log.With( "type", @@ -301,7 +301,7 @@ func (r *Registry) deliverAcceptToInbox(url, actorUrl, actorKeyUrl *url.URL, fol r.mu.Unlock() b64sig := base64.StdEncoding.EncodeToString(signature) - var header = `keyId="` + actorKeyUrl.String() + `",algorithm="rsa-sha256",headers="(request-target) content-type date digest host",signature="` + b64sig + `"` + var header = `keyId="` + actorKeyUrl.String() + `",algorithm="rsa-sha256",headers="(request-target) date digest host",signature="` + b64sig + `"` request.Header.Add("Signature", header) //http sig signing code - broken? |