Skip to content

Commit 3f29e64

Browse files
authored
Fix WebHeaderCollection header restrictions docs (#4972)
Fix WebHeaderCollection header restrictions docs according to its implementation. Header restrictions are not checked since WebHeaderCollection was transferred to .NET Core.
1 parent 6f48907 commit 3f29e64

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xml/System.Net/WebHeaderCollection.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@
8282
<format type="text/markdown"><![CDATA[
8383
8484
## Remarks
85-
The <xref:System.Net.WebHeaderCollection> class is generally accessed through <xref:System.Net.WebRequest.Headers%2A?displayProperty=nameWithType> or <xref:System.Net.WebResponse.Headers%2A?displayProperty=nameWithType>. Some common headers are considered restricted and are either exposed directly by the API (such as `Content-Type`) or protected by the system and cannot be changed.
86-
85+
The <xref:System.Net.WebHeaderCollection> class is generally accessed through <xref:System.Net.WebRequest.Headers%2A?displayProperty=nameWithType> or <xref:System.Net.WebResponse.Headers%2A?displayProperty=nameWithType>.
86+
87+
On .NET Framework, some common headers are considered restricted and are either exposed directly by the API (such as `Content-Type`) or protected by the system and cannot be changed. This does *not* apply to .NET Core and .NET 5+ - none of the headers are restricted there.
88+
8789
The restricted headers are:
8890
8991
- Accept

0 commit comments

Comments
 (0)