Skip to content

Commit 3e2307d

Browse files
authored
Update HttpHeaders.xml
1 parent 9bae508 commit 3e2307d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@
127127
<format type="text/markdown"><![CDATA[
128128
129129
## Remarks
130+
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.
131+
130132
The header `values` will be parsed and validated.
131133
132134
If the specified header does not exist, the <xref:System.Net.Http.Headers.HttpHeaders.Add%2A> method inserts a new header into the list of header name/value pairs.
@@ -138,7 +140,7 @@
138140
<exception cref="T:System.ArgumentException">The name cannot be null or empty.</exception>
139141
<exception cref="T:System.ArgumentNullException">The values cannot be null or empty.</exception>
140142
<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">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.
143+
<exception cref="T:System.FormatException">The header name format is invalid.
142144

143145
-or-
144146

@@ -187,7 +189,9 @@ The header value format is invalid for this header name, or the header does not
187189
<format type="text/markdown"><![CDATA[
188190
189191
## Remarks
190-
The header `value` will be parsed and validated.
192+
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.
193+
194+
The header `values` will be parsed and validated.
191195
192196
If the specified header does not exist, the <xref:System.Net.Http.Headers.HttpHeaders.Add%2A> method inserts a new header into the list of header name/value pairs.
193197
@@ -197,7 +201,7 @@ The header value format is invalid for this header name, or the header does not
197201
</remarks>
198202
<exception cref="T:System.ArgumentException">The name cannot be null or empty.</exception>
199203
<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">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.
204+
<exception cref="T:System.FormatException">The header name format is invalid.
201205

202206
-or-
203207

0 commit comments

Comments
 (0)