Skip to content

Commit a901271

Browse files
committed
Small touches
1 parent 34ff9fb commit a901271

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ This document specifies problem types that servers can use in responses to probl
4949

5050
# Introduction
5151

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.
5353

5454
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.
5555

@@ -119,9 +119,9 @@ Want-Repr-Digest: sha-512=10, sha-256=0
119119

120120

121121
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-
123122
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:
125125

126126
~~~ http-message
127127
GET /items/123 HTTP/1.1
@@ -143,9 +143,6 @@ Content-Type: application/problem+json
143143
~~~
144144
{: title="Response Advertising the Supported Algorithms"}
145145

146-
147-
148-
149146
## Invalid Digest Value
150147

151148
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.
@@ -177,7 +174,6 @@ Content-Type: application/problem+json
177174

178175
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.
179176

180-
181177
## Mismatching Digest Value
182178

183179
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

Comments
 (0)