Skip to content

Commit d0bc9e7

Browse files
committed
Use calculated-digest instead of expected-digest
Closes tus/draft-digest-fields-problem-types#4.
1 parent bc8b8e5 commit d0bc9e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

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

118-
If the sender receives this problem type, it SHOULD NOT retry the request without modification. Such an error is likely rooted in a fault in the sender's computation or encoding of the digest value.
118+
If the sender receives this problem type, it SHOULD NOT retry the request without modification. Such an error is likely rooted in a fault in the sender's calculation or encoding of the digest value.
119119

120120
## Mismatching Digest Value
121121

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.
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 calculated for the request content or representation.
123123

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}}.
124+
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}}.
125125

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

@@ -134,7 +134,7 @@ Content-Type: application/problem+json
134134
"title": "digest value fromr request does not match expected value",
135135
"algorithm": "sha-256",
136136
"provided-digest": ":RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:",
137-
"expected-digest": ":d435Qo+nKZ+gLcUHn7GQtQ72hiBVAgqoLsZnZPiTGPk=:"
137+
"calculated-digest": ":d435Qo+nKZ+gLcUHn7GQtQ72hiBVAgqoLsZnZPiTGPk=:"
138138
}
139139
~~~
140140

0 commit comments

Comments
 (0)