From bdbfe1a403c1fa144083e40ad9c28c611baa3e57 Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Thu, 5 Jan 2023 20:14:12 -0500 Subject: try without content type --- registry/registry.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'registry/registry.go') 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? -- cgit v1.2.3