Skip to content

Commit 9bae508

Browse files
authored
Update HttpHeaders.Add exception docs
1 parent c9d0e37 commit 9bae508

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xml/System.Net.Http.Headers/HttpHeaders.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@
138138
<exception cref="T:System.ArgumentException">The name cannot be null or empty.</exception>
139139
<exception cref="T:System.ArgumentNullException">The values cannot be null or empty.</exception>
140140
<exception cref="T:System.InvalidOperationException">Misused header name. Make sure request headers are used with HttpRequestMessage, response headers with HttpResponseMessage, and content headers with HttpContent objects.</exception>
141-
<exception cref="T:System.FormatException">The header name format is invalid.
141+
<exception cref="T:System.FormatException">Header names are enforced to be valid HTTP tokens, where a token is defined as any set of ASCII letters, digits, or symbols from the ``"!#$%&'*+-.^_`|~"`` set, matching [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-collected-abnf)'s definition. Non-ASCII characters are not allowed in a header name.
142142

143143
-or-
144144

145-
New line characters in header values must be followed by a white-space character.
145+
The header value format is invalid for this header name, or the header does not support multiple values.
146146
</exception>
147147
</Docs>
148148
</Member>
@@ -197,11 +197,11 @@ New line characters in header values must be followed by a white-space character
197197
</remarks>
198198
<exception cref="T:System.ArgumentException">The name cannot be null or empty.</exception>
199199
<exception cref="T:System.InvalidOperationException">Misused header name. Make sure request headers are used with HttpRequestMessage, response headers with HttpResponseMessage, and content headers with HttpContent objects.</exception>
200-
<exception cref="T:System.FormatException">The header name format is invalid.
200+
<exception cref="T:System.FormatException">Header names are enforced to be valid HTTP tokens, where a token is defined as any set of ASCII letters, digits, or symbols from the ``"!#$%&'*+-.^_`|~"`` set, matching [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-collected-abnf)'s definition. Non-ASCII characters are not allowed in a header name.
201201

202202
-or-
203203

204-
New line characters in header values must be followed by a white-space character.
204+
The header value format is invalid for this header name, or the header does not support multiple values.
205205
</exception>
206206
</Docs>
207207
</Member>

0 commit comments

Comments
 (0)