Skip to content

Commit 03c9d55

Browse files
committed
Wrap long lines
1 parent 8149889 commit 03c9d55

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

draft-ietf-httpapi-digest-fields-problem-types.md

+23-5
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ normative:
4343
PROBLEM: RFC9457
4444
STRUCTURED-FIELDS: RFC9651
4545
HTTP: RFC9110
46+
RFC8792:
4647

4748
informative:
4849

@@ -60,12 +61,15 @@ This document specifies problem types that servers can use in responses to probl
6061
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.
6162

6263
~~~ http-message
64+
# NOTE: '\' line wrapping per RFC 8792
65+
6366
HTTP/1.1 400 Bad Request
6467
Content-Type: application/problem+json
6568
Want-Content-Digest: sha-512=3, sha-256=10
6669

6770
{
68-
"type": "https://iana.org/assignments/http-problem-types#digest-unsupported-algorithm",
71+
"type": "https://iana.org/assignments/http-problem-types#\
72+
digest-unsupported-algorithm",
6973
"title": "hashing algorithm is not supported",
7074
"unsupported-algorithm": "foo"
7175
}
@@ -75,6 +79,8 @@ Want-Content-Digest: sha-512=3, sha-256=10
7579

7680
{::boilerplate bcp14-tagged}
7781

82+
Some examples in this document contain long lines that may be folded, as described in {{RFC8792}}.
83+
7884
The terms "integrity fields" and "integrity preference fields" in this document are to be
7985
interpreted as described in {{DIGEST}}.
8086

@@ -111,12 +117,15 @@ Repr-Digest: sha-256=:mEkdbO7Srd9LIOegftO0aBX+VPTVz7/CSHes2Z27gc4=:
111117
{: title="A request with a sha-256 integrity field, which is not supported by the server"}
112118

113119
~~~ http-message
120+
# NOTE: '\' line wrapping per RFC 8792
121+
114122
HTTP/1.1 400 Bad Request
115123
Content-Type: application/problem+json
116124
Want-Repr-Digest: sha-512=10, sha-256=0
117125

118126
{
119-
"type": "https://iana.org/assignments/http-problem-types#digest-unsupported-algorithm",
127+
"type": "https://iana.org/assignments/http-problem-types#\
128+
digest-unsupported-algorithm",
120129
"title": "Unsupported hashing algorithm",
121130
"unsupported-algorithm": "sha-256"
122131
}
@@ -138,11 +147,14 @@ Want-Repr-Digest: sha=10
138147
{: title="GET Request with Want-Repr-Digest"}
139148

140149
~~~ http-message
150+
# NOTE: '\' line wrapping per RFC 8792
151+
141152
HTTP/1.1 400 Bad Request
142153
Content-Type: application/problem+json
143154

144155
{
145-
"type": "https://iana.org/assignments/http-problem-types#digest-unsupported-algorithm",
156+
"type": "https://iana.org/assignments/http-problem-types#\
157+
digest-unsupported-algorithm",
146158
"title": "Unsupported hashing algorithm",
147159
"unsupported-algorithm": "sha"
148160
}
@@ -168,11 +180,14 @@ Repr-Digest: sha-512=:YMAam51Jz/jOATT6/zvHrLVgOYTGFy1d6GJiOHTohq4:
168180
{: title="A request with a sha-512 integrity field, whose digest has been truncated"}
169181

170182
~~~ http-message
183+
# NOTE: '\' line wrapping per RFC 8792
184+
171185
HTTP/1.1 400 Bad Request
172186
Content-Type: application/problem+json
173187

174188
{
175-
"type": "https://iana.org/assignments/http-problem-types#digest-invalid-value",
189+
"type": "https://iana.org/assignments/http-problem-types#\
190+
digest-invalid-value",
176191
"title": "digest value for sha-512 is not 64 bytes long"
177192
}
178193
~~~
@@ -199,11 +214,14 @@ Repr-Digest: sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:
199214
{: title="A request with a sha-256 integrity field, which does not match the representation"}
200215

201216
~~~ http-message
217+
# NOTE: '\' line wrapping per RFC 8792
218+
202219
HTTP/1.1 400 Bad Request
203220
Content-Type: application/problem+json
204221

205222
{
206-
"type": "https://iana.org/assignments/http-problem-types#digest-mismatching-value",
223+
"type": "https://iana.org/assignments/http-problem-types#\
224+
digest-mismatching-value",
207225
"title": "digest value from request does not match expected value",
208226
"algorithm": "sha-256",
209227
"provided-digest": ":RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:"

0 commit comments

Comments
 (0)