File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,9 @@ func TestValidateContentDigestHeader(t *testing.T) {
9696 err = ValidateContentDigestHeader (hdr , & res6 .Body , []string {DigestSha256 })
9797 assert .Error (t , err , "digest mismatch" )
9898
99- // TODO fix when the draft is modified, https://github.com/httpwg/http-extensions/pull/2049
99+ // Response taken from the draft,see https://github.com/httpwg/http-extensions/pull/2049
100100 res7 := readResponse (httpres4 )
101101 hdr = res7 .Header .Values ("Content-Digest" )
102102 err = ValidateContentDigestHeader (hdr , & res7 .Body , []string {DigestSha512 })
103- assert .Error (t , err , "digest mismatch?" )
103+ assert .NoError (t , err , "digest mismatch?" )
104104}
Original file line number Diff line number Diff line change @@ -166,10 +166,10 @@ Content-Length: 18
166166var httpres4 = `HTTP/1.1 200 OK
167167Date: Tue, 20 Apr 2021 02:07:56 GMT
168168Content-Type: application/json
169- Content-Digest: sha-512=:JlEy2bfUz7WrWIjc1qV6KVLpdr/7L5/L4h7Sxvh6sNHpDQWDCL+GauFQWcZBvVDhiyOnAQsxzZFYwi0wDH+1pw ==:
169+ Content-Digest: sha-512=:mEWXIS7MaLRuGgxOBdODa3xqM1XdEvxoYhvlCFJ41QJgJc4GTsPp29l5oGX69wWdXymyU0rjJuahq4l5aGgfLQ ==:
170170Content-Length: 23
171171Signature-Input: sig-b24=("@status" "content-type" "content-digest" "content-length");created=1618884473;keyid="test-key-ecc-p256"
172- Signature: sig-b24=:0Ry6HsvzS5VmA6HlfBYS/fYYeNs7fYuA7s0tAdxfUlPGv0CSVuwrrzBOjcCFHTxVRJ01wjvSzM2BetJauj8dsw ==:
172+ Signature: sig-b24=:wNmSUAhwb5LxtOtOpNa6W5xj067m5hFrj0XQ4fvpaCLx0NKocgPquLgyahnzDnDAUy5eCdlYUEkLIj+32oiasw ==:
173173
174174{"message": "good dog"}
175175`
You can’t perform that action at this time.
0 commit comments