Skip to content

Commit 9799388

Browse files
authored
Merge branch 'main' into client-behavior
2 parents 5502f95 + d0bc9e7 commit 9799388

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

draft-kleidl-digest-fields-problem-types.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,14 @@ Content-Type: application/problem+json
115115
}
116116
~~~
117117

118-
This problem type indicates a fault in the sender's computation or encoding of the digest value. A retry of the same request without modification will likely not yield a successful response.
118+
This problem type indicates a fault in the sender's calculation or encoding of the digest value. A retry of the same request without modification will likely not yield a successful response.
119+
119120

120121
## Mismatching Digest Value
121122

122-
This section defines the "https://iana.org/assignments/http-problem-types#mismatching-digest-value" problem type {{PROBLEM}}. A server MAY use this problem type when responding to a request, whose integrity fields include a digest value that does not match the digest value that the server computed for the request content or representation.
123+
This section defines the "https://iana.org/assignments/http-problem-types#mismatching-digest-value" problem type {{PROBLEM}}. A server MAY use this problem type when responding to a request, whose integrity fields include a digest value that does not match the digest value that the server calculated for the request content or representation.
123124

124-
Three problem type extension members are defined: the `algorithm`, `provided-digest`, and `expected-digest` members. A response using this problem type SHOULD populate all members, with the value of `algorithm` being the algorithm key of the used hashing algorithm, with the value of `provided-digest` being the digest value taken from the request's integrity fields, and the value of `expected-digest` being the computed digest. The digest values MUST BE serialized as byte sequences as described in {{Section 4.1.8 of STRUCTURED-FIELDS}}.
125+
Three problem type extension members are defined: the `algorithm`, `provided-digest`, and `calculated-digest` members. A response using this problem type SHOULD populate all members, with the value of `algorithm` being the algorithm key of the used hashing algorithm, with the value of `provided-digest` being the digest value taken from the request's integrity fields, and the value of `calculated-digest` being the calculated digest. The digest values MUST BE serialized as byte sequences as described in {{Section 4.1.8 of STRUCTURED-FIELDS}}.
125126

126127
The following example shows a response for a request with a mismatching SHA-256 digest value.
127128

@@ -134,7 +135,7 @@ Content-Type: application/problem+json
134135
"title": "digest value fromr request does not match expected value",
135136
"algorithm": "sha-256",
136137
"provided-digest": ":RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:",
137-
"expected-digest": ":d435Qo+nKZ+gLcUHn7GQtQ72hiBVAgqoLsZnZPiTGPk=:"
138+
"calculated-digest": ":d435Qo+nKZ+gLcUHn7GQtQ72hiBVAgqoLsZnZPiTGPk=:"
138139
}
139140
~~~
140141

0 commit comments

Comments
 (0)