Skip to content

Commit 318d1b0

Browse files
Merge pull request #12010 from dotnet/main
Merge main into live
2 parents e32c6a6 + 87ac518 commit 318d1b0

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

xml/System.Net.Http/SocketsHttpHandler.xml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,20 @@ For example, if the value is 64, then 65,536 bytes are allowed for the maximum r
11241124
<Docs>
11251125
<summary>Gets or sets a callback that selects the <see cref="System.Text.Encoding" /> to encode request header values.</summary>
11261126
<value>The header encoding selector callback that selects the <see cref="System.Text.Encoding" /> to encode the value for the specified request header name, or <see langword="null" /> to indicate the default behavior.</value>
1127-
<remarks>To be added.</remarks>
1127+
<remarks>
1128+
<format type="text/markdown"><![CDATA[
1129+
1130+
## Remarks
1131+
1132+
When specifying an encoding, you're generally expected to use one of the following encoding schemes: <xref:System.Text.Encoding.ASCII>, <xref:System.Text.Encoding.Latin1>, or <xref:System.Text.Encoding.UTF8>. Other encoding schemes might be susceptible to request smuggling attacks.
1133+
1134+
> [!CAUTION]
1135+
> Fixed multi-byte encoding schemes in particular (for example, <xref:System.Text.Encoding.Unicode> or <xref:System.Text.Encoding.UTF32>) must never be used, as their binary representation is likely to be misinterpreted and break the protocol. For instance, part of `✊` might be interpreted as a new line (`\n`) that terminates the header value.
1136+
1137+
When you specify an encoding, it's your responsibility to ensure that the values are representable via the encoding, and that the server agrees on the encoding used. Otherwise, values will become corrupted. For example, since any set of bytes is considered a valid Latin1 sequence, a server replying with UTF-8 encoded header values might see its responses silently corrupted.
1138+
1139+
]]></format>
1140+
</remarks>
11281141
<exception cref="T:System.InvalidOperationException">An operation has already been started on the current instance.</exception>
11291142
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
11301143
</Docs>
@@ -1199,7 +1212,20 @@ The timeout specified is greater than <see cref="F:System.Int32.MaxValue" /> mil
11991212
<Docs>
12001213
<summary>Gets or sets a callback that selects the <see cref="System.Text.Encoding" /> to decode response header values.</summary>
12011214
<value>The header encoding selector callback that selects the <see cref="System.Text.Encoding" /> to decode the value for the specified response header name, or <see langword="null" /> to indicate the default behavior.</value>
1202-
<remarks>To be added.</remarks>
1215+
<remarks>
1216+
<format type="text/markdown"><![CDATA[
1217+
1218+
## Remarks
1219+
1220+
When specifying an encoding, you're generally expected to use one of the following encoding schemes: <xref:System.Text.Encoding.ASCII>, <xref:System.Text.Encoding.Latin1>, or <xref:System.Text.Encoding.UTF8>. Other encoding schemes might be susceptible to request smuggling attacks.
1221+
1222+
> [!CAUTION]
1223+
> Fixed multi-byte encoding schemes in particular (for example, <xref:System.Text.Encoding.Unicode> or <xref:System.Text.Encoding.UTF32>) must never be used, as their binary representation is likely to be misinterpreted and break the protocol. For instance, part of `✊` might be interpreted as a new line (`\n`) that terminates the header value.
1224+
1225+
When you specify an encoding, it's your responsibility to ensure that the values are representable via the encoding, and that the server agrees on the encoding used. Otherwise, values will become corrupted. For example, since any set of bytes is considered a valid Latin1 sequence, a server replying with UTF-8 encoded header values might see its responses silently corrupted.
1226+
1227+
]]></format>
1228+
</remarks>
12031229
<exception cref="T:System.InvalidOperationException">An operation has already been started on the current instance.</exception>
12041230
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
12051231
</Docs>

xml/System/Uri.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,6 +2108,9 @@ If you used an escaped string to construct this instance (for example, `"http://
21082108
21092109
The <xref:System.Uri.Fragment%2A> property is not considered in any <xref:System.Uri.Equals%2A> comparison.
21102110
2111+
> [!NOTE]
2112+
> The property includes the leading delimiter (`#`), whereas the URI specification (RFC 3986) recognizes the fragment as the portion of a URI without the delimiter.
2113+
21112114
## Examples
21122115
The following example creates a <xref:System.Uri> instance and writes the fragment information to the console.
21132116
@@ -4218,6 +4221,9 @@ The following examples show a URI and the results of calling <xref:System.Uri.Ge
42184221
42194222
For more information on IRI support, see the Remarks section for the <xref:System.Uri> class.
42204223
4224+
> [!NOTE]
4225+
> The property includes the leading delimiter (`?`), whereas the URI specification (RFC 3986) recognizes the query as the portion of a URI without the delimiter.
4226+
42214227
## Examples
42224228
The following example writes the query `?date=today` to the console.
42234229

0 commit comments

Comments
 (0)