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
@@ -98,14 +99,15 @@ A server MAY use this problem type if it wants to communicate to the client that
98
99
one of the hashing algorithms referenced in the integrity or integrity preference fields present in the request
99
100
is not supported.
100
101
101
-
For this problem type, `unsupported-algorithm` is defined as the only extension member.
102
-
It SHOULD be populated in a response using this problem type, with its value being the algorithm key of the unsupported algorithm from the request.
102
+
Two problem type extension members are defined, which SHOULD be populated for all responses using this problem type:
103
+
104
+
- The `unsupported-algorithm` extension member identifies the unsupported algorithm from the request. Its value is the corresponding algorithm key.
105
+
- The `header` extension member as defined in {{identifying-problem-causing-headers}}.
106
+
103
107
The response can include the corresponding integrity preference field to indicate the server's algorithm support and preference.
104
108
105
109
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.
106
110
107
-
Note that a request may contain more than one integrity fields or integrity preference fields.
This section defines the "https://iana.org/assignments/http-problem-types#digest-invalid-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 SHA-512 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.
167
171
172
+
One problem type extension member is defined, which SHOULD be populated for all responses using this problem type:
173
+
174
+
- The `header` extension member as defined in {{identifying-problem-causing-headers}}.
175
+
168
176
The server SHOULD include a human-readable description why the value is considered invalid in the `title` member.
169
177
170
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.
This section defines the "https://iana.org/assignments/http-problem-types#digest-mismatching-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.
201
210
202
-
Two problem type extension members are defined: the `algorithm` and `provided-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 and the value of `provided-digest` being the digest value taken from the request's integrity fields. The digest value is serialized as a byte sequence as described in {{Section 4.1.8 of STRUCTURED-FIELDS}}.
211
+
212
+
Three problem type extension members are defined, which SHOULD be populated for all responses using this problem type:
213
+
214
+
- The `algorithm` extension member is the algorithm key of the used hashing algorithm.
215
+
- The `provided-digest` extension member is the digest value taken from the request's integrity fields. The digest value is serialized as a byte sequence as described in {{Section 4.1.8 of STRUCTURED-FIELDS}}.
216
+
- The `header` extension member as defined in {{identifying-problem-causing-headers}}.
203
217
204
218
The problem type intentionally does not include the digest value calculated by the server to avoid attackers abusing this information for oracle attacks.
{: title="Response indicating the mismatching digests"}
235
250
251
+
# Identifying Problem Causing Headers
252
+
253
+
Requests can include multiple integrity or integrity preference fields. For example, they may use the `Content-Digest` and `Repr-Digest` fields simultaneously or express preferences for content and representation digests at the same time. To aid troubleshooting, it's useful to identify the header field, whose value caused the problem detailed in the response. For this reason, the `header` extension member is defined, which SHOULD be populated for all responses using the problem types defined in this document.
254
+
255
+
The `header` extension member's value is the header field name that caused the problem. Since HTTP header field names are case-insensitive and not all HTTP versions preserve their casing, the casing of extension member's value might not match the request header field name's casing.
0 commit comments