Skip to content

Commit fba3606

Browse files
authored
Merge branch 'main' into ioggstream-editorial-2
2 parents 6b0baaa + 8c1f4c1 commit fba3606

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

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

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

5151
{{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.
5252

53-
For example, a request message may include content alongside `Content-Digest` and `Repr-Digest` header 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.
53+
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.
5454

5555
~~~ http-message
5656
HTTP/1.1 400 Bad Request
@@ -68,13 +68,17 @@ Want-Content-Digest: sha-512=3, sha-256=10
6868

6969
{::boilerplate bcp14-tagged}
7070

71-
The terms "integrity fields" and "integrity preference fields" are from {{DIGEST}}.
71+
The terms "integrity fields" and "integrity preference fields" in this document are to be
72+
interpreted as described in {{DIGEST}}.
73+
74+
The term "problem type" in this document is to be
75+
interpreted as described in {{PROBLEM}}.
7276

7377
# Problem Types
7478

7579
## Unsupported Hashing Algorithm
7680

77-
This section defines the "https://iana.org/assignments/http-problem-types#unsupported-hashing-algorithm" problem type {{PROBLEM}}.
81+
This section defines the "https://iana.org/assignments/http-problem-types#unsupported-hashing-algorithm" problem type.
7882
A server MAY use this problem type if it wants to communicate to the client that
7983
none of the hashing algorithms referenced in the integrity or integrity preference fields present in the request,
8084
is supported.
@@ -142,7 +146,7 @@ Want-Repr-Digest: sha-512=10, sha-256=3
142146

143147
## Invalid Digest Value
144148

145-
This section defines the "https://iana.org/assignments/http-problem-types#invalid-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 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.
149+
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.
146150

147151
The server SHOULD include a human-readable description why the value is considered invalid in the `title` member.
148152

@@ -163,7 +167,7 @@ This problem type indicates a fault in the sender's calculation or encoding of t
163167

164168
## Mismatching Digest Value
165169

166-
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.
170+
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.
167171

168172
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}}.
169173

0 commit comments

Comments
 (0)