Skip to content

Commit b92832d

Browse files
committed
One more test case for a draft issue
1 parent 2e75e09 commit b92832d

3 files changed

Lines changed: 8 additions & 20 deletions

File tree

digest_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

doc.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
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.
810
package httpsign

gendoc.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)