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
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ This document specifies problem types that servers can use in responses to probl
49
49
50
50
# Introduction
51
51
52
-
{{DIGEST}} by design does not define, require or recommend any specific behavior for error handling relating to integrity. The responsibility is instead delegated to applications. This draft defines a set of problem types {{PROBLEM}} that can be used by server applications to indicate that a problem was encountered while dealing with a request carrying integrity fields and integrity preference fields.
52
+
{{DIGEST}} by design does not define, require or recommend any specific behavior for error handling relating to integrity. The responsibility is instead delegated to applications. This draft defines a set of problem types ({{PROBLEM}}) that can be used by server applications to indicate that a problem was encountered while dealing with a request carrying integrity fields and integrity preference fields.
53
53
54
54
For example, a request message may include content alongside `Content-Digest` and `Repr-Digest` fields that use a digest algorithm the server does not support. An application could decide to reject this request because it cannot validate the integrity. Using a problem type, the server can provide machine-readable error details to aid debugging or error reporting, as shown in the following example.
This problem type is a hint to the client about algorithm support, which the client could use to retry the request with a different, supported, algorithm.
122
-
123
122
Note that a request may contain more than one integrity field.
124
-
This problem type can also be used when a request contains an integrity preference field, e.g.
123
+
124
+
This problem type can also be used when a request contains an integrity preference field. For example:
{: title="Response Advertising the Supported Algorithms"}
145
145
146
-
147
-
148
-
149
146
## Invalid Digest Value
150
147
151
148
This section defines the "https://iana.org/assignments/http-problem-types#invalid-digest-value" problem type. A server MAY use this problem type when responding to a request, whose integrity fields include a digest value, that cannot be generated by the corresponding hashing algorithm. For example, if the digest value of the `sha-512` hashing algorithm is not 64 bytes long, it cannot be a valid digest value and the server can skip computing the digest value. This problem type MUST NOT be used if the server is not able to parse the integrity fields according to {{Section 4.5 of STRUCTURED-FIELDS}}, for example because of a syntax error in the field value.
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.
179
176
180
-
181
177
## Mismatching Digest Value
182
178
183
179
This section defines the "https://iana.org/assignments/http-problem-types#mismatching-digest-value" problem type. 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.
0 commit comments