You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-kleidl-digest-fields-problem-types.md
+25-3Lines changed: 25 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,17 @@ This section defines the "https://iana.org/assignments/http-problem-types#invali
152
152
153
153
The server SHOULD include a human-readable description why the value is considered invalid in the `title` member.
154
154
155
-
The following example shows a response for a request with an invalid digest value.
155
+
The following example shows a request with the content `{"hello": "world"}` (plus LF), but the digest has been truncated. The subsequent response indicates the invalid SHA-512 digest.
"title": "digest value for sha-512 is not 64 bytes long"
164
174
}
165
175
~~~
176
+
{: title="Response indicating that the provided digest is too short"}
166
177
167
178
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.
168
179
@@ -173,7 +184,17 @@ This section defines the "https://iana.org/assignments/http-problem-types#mismat
173
184
174
185
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}}.
175
186
176
-
The following example shows a response for a request with a mismatching SHA-256 digest value.
187
+
The following example shows a request with the content `{"hello": "woXYZ"}` (plus LF), but the representation digest for `{"hello": "world"}` (plus LF). The subsequent response indicates the mismatching SHA-256 digest values.
{: title="Response indicating the mismatching digests"}
190
212
191
213
If the sender receives this problem type, the request might be modified unintentionally by an intermediary. The sender could use this information to retry the request without modification to address temporary transmission issues.
0 commit comments