File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,4 +95,10 @@ func TestValidateContentDigestHeader(t *testing.T) {
9595 hdr = res6 .Header .Values ("Content-Digest" )
9696 err = ValidateContentDigestHeader (hdr , & res6 .Body , []string {DigestSha256 })
9797 assert .Error (t , err , "digest mismatch" )
98+
99+ // TODO fix when the draft is modified,https://github.com/httpwg/http-extensions/pull/2049
100+ res7 := readResponse (httpres4 )
101+ hdr = res7 .Header .Values ("Content-Digest" )
102+ err = ValidateContentDigestHeader (hdr , & res7 .Body , []string {DigestSha512 })
103+ assert .Error (t , err , "digest mismatch?" )
98104}
Original file line number Diff line number Diff line change 55// Alternatively you can use SignRequest, VerifyResponse etc. directly, but this is more complicated.
66// For server-side operation,
77// WrapHandler installs a wrapper around a normal HTTP message handler.
8+ // Digest functionality (creation and validation of the Content-Digest header) is available automatically
9+ // through the Client and WrapHandler interfaces, otherwise it is available separately.
810package httpsign
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments