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-ietf-httpapi-digest-fields-problem-types.html
+42-22Lines changed: 42 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -11,20 +11,20 @@
11
11
<metacontent="
12
12
This document specifies problem types that servers can use in responses to problems encountered while dealing with a request carrying integrity fields and integrity preference fields.
<pid="section-1-2">For example, a request message may include content alongside <code>Content-Digest</code> and <code>Repr-Digest</code> 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.<ahref="#section-1-2" class="pilcrow">¶</a></p>
"<spanclass="bcp14">MAY</span>", and "<spanclass="bcp14">OPTIONAL</span>" in this document are to be interpreted as
1236
1239
described in BCP 14 <span>[<ahref="#RFC2119" class="cite xref">RFC2119</a>]</span><span>[<ahref="#RFC8174" class="cite xref">RFC8174</a>]</span> when, and only when, they
1237
1240
appear in all capitals, as shown here.<ahref="#section-2-1" class="pilcrow">¶</a></p>
1238
-
<pid="section-2-2">The terms "integrity fields" and "integrity preference fields" in this document are to be
1239
-
interpreted as described in <span>[<ahref="#DIGEST" class="cite xref">DIGEST</a>]</span>.<ahref="#section-2-2" class="pilcrow">¶</a></p>
1240
-
<pid="section-2-3">The term "problem type" in this document is to be
1241
-
interpreted as described in <span>[<ahref="#PROBLEM" class="cite xref">PROBLEM</a>]</span>.<ahref="#section-2-3" class="pilcrow">¶</a></p>
1242
-
<pid="section-2-4">The term "request", "response", "intermediary", "sender", and "server" are from <span>[<ahref="#HTTP" class="cite xref">HTTP</a>]</span>.<ahref="#section-2-4" class="pilcrow">¶</a></p>
1241
+
<pid="section-2-2">Some examples in this document contain long lines that may be folded, as described in <span>[<ahref="#RFC8792" class="cite xref">RFC8792</a>]</span>.<ahref="#section-2-2" class="pilcrow">¶</a></p>
1242
+
<pid="section-2-3">The terms "integrity fields" and "integrity preference fields" in this document are to be
1243
+
interpreted as described in <span>[<ahref="#DIGEST" class="cite xref">DIGEST</a>]</span>.<ahref="#section-2-3" class="pilcrow">¶</a></p>
1244
+
<pid="section-2-4">The term "problem type" in this document is to be
1245
+
interpreted as described in <span>[<ahref="#PROBLEM" class="cite xref">PROBLEM</a>]</span>.<ahref="#section-2-4" class="pilcrow">¶</a></p>
1246
+
<pid="section-2-5">The term "request", "response", "intermediary", "sender", and "server" are from <span>[<ahref="#HTTP" class="cite xref">HTTP</a>]</span>.<ahref="#section-2-5" class="pilcrow">¶</a></p>
<pid="section-3.2-1">This section defines the "https://iana.org/assignments/http-problem-types#digest-invalid-value" problem type. A server <spanclass="bcp14">MAY</span> 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 <code>sha-512</code> 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 <spanclass="bcp14">MUST NOT</span> be used if the server is not able to parse the integrity fields according to <span><ahref="https://rfc-editor.org/rfc/rfc8941#section-4.5" class="relref">Section 4.5</a> of [<ahref="#STRUCTURED-FIELDS" class="cite xref">STRUCTURED-FIELDS</a>]</span>, for example because of a syntax error in the field value.<ahref="#section-3.2-1" class="pilcrow">¶</a></p>
1344
+
<pid="section-3.2-1">This section defines the "https://iana.org/assignments/http-problem-types#digest-invalid-value" problem type. A server <spanclass="bcp14">MAY</span> 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 <code>sha-512</code> 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 <spanclass="bcp14">MUST NOT</span> be used if the server is not able to parse the integrity fields according to <span><ahref="https://rfc-editor.org/rfc/rfc9651#section-4.5" class="relref">Section 4.5</a> of [<ahref="#STRUCTURED-FIELDS" class="cite xref">STRUCTURED-FIELDS</a>]</span>, for example because of a syntax error in the field value.<ahref="#section-3.2-1" class="pilcrow">¶</a></p>
1335
1345
<pid="section-3.2-2">The server <spanclass="bcp14">SHOULD</span> include a human-readable description why the value is considered invalid in the <code>title</code> member.<ahref="#section-3.2-2" class="pilcrow">¶</a></p>
1336
1346
<pid="section-3.2-3">The following example shows a request with the content <code>{"hello": "world"}</code> (plus LF), but the digest has been truncated. The subsequent response indicates the invalid SHA-512 digest.<ahref="#section-3.2-3" class="pilcrow">¶</a></p>
<pid="section-3.3-1">This section defines the "https://iana.org/assignments/http-problem-types#digest-mismatching-value" problem type. A server <spanclass="bcp14">MAY</span> 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.<ahref="#section-3.3-1" class="pilcrow">¶</a></p>
1375
-
<pid="section-3.3-2">Two problem type extension members are defined: the <code>algorithm</code> and <code>provided-digest</code> members. A response using this problem type <spanclass="bcp14">SHOULD</span> populate all members, with the value of <code>algorithm</code> being the algorithm key of the used hashing algorithm and the value of <code>provided-digest</code> being the digest value taken from the request's integrity fields. The digest value <spanclass="bcp14">MUST</span> be serialized as byte sequences as described in <span><ahref="https://rfc-editor.org/rfc/rfc8941#section-4.1.8" class="relref">Section 4.1.8</a> of [<ahref="#STRUCTURED-FIELDS" class="cite xref">STRUCTURED-FIELDS</a>]</span>.<ahref="#section-3.3-2" class="pilcrow">¶</a></p>
1388
+
<pid="section-3.3-2">Two problem type extension members are defined: the <code>algorithm</code> and <code>provided-digest</code> members. A response using this problem type <spanclass="bcp14">SHOULD</span> populate all members, with the value of <code>algorithm</code> being the algorithm key of the used hashing algorithm and the value of <code>provided-digest</code> being the digest value taken from the request's integrity fields. The digest value <spanclass="bcp14">MUST</span> be serialized as byte sequences as described in <span><ahref="https://rfc-editor.org/rfc/rfc9651#section-4.1.8" class="relref">Section 4.1.8</a> of [<ahref="#STRUCTURED-FIELDS" class="cite xref">STRUCTURED-FIELDS</a>]</span>.<ahref="#section-3.3-2" class="pilcrow">¶</a></p>
1376
1389
<pid="section-3.3-3">The following example shows a request with the content <code>{"hello": "woXYZ"}</code> (plus LF), but the representation digest for <code>{"hello": "world"}</code> (plus LF). The subsequent response indicates the mismatching SHA-256 digest values.<ahref="#section-3.3-3" class="pilcrow">¶</a></p>
0 commit comments