diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HeaderEncodingSelector.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HeaderEncodingSelector.cs
index cb984b838cb5c3..4a13d67913485b 100644
--- a/src/libraries/System.Net.Http/src/System/Net/Http/HeaderEncodingSelector.cs
+++ b/src/libraries/System.Net.Http/src/System/Net/Http/HeaderEncodingSelector.cs
@@ -9,7 +9,8 @@ namespace System.Net.Http
/// Represents a method that specifies the to use when interpreting header values.
///
/// Name of the header to specify the for.
- /// The we are enoding/decoding the headers for.
+ /// The we are encoding/decoding the headers for.
+ /// The type which headers are being encoded/decoded;
/// to use or to use the default behavior.
public delegate Encoding? HeaderEncodingSelector(string headerName, TContext context);
}
diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpContent.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpContent.cs
index eabc0efe68e0a1..90bd0ad0251bdb 100644
--- a/src/libraries/System.Net.Http/src/System/Net/Http/HttpContent.cs
+++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpContent.cs
@@ -551,6 +551,17 @@ private async Task LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStr
}
}
+ ///
+ /// Serializes the HTTP content to a memory stream.
+ ///
+ /// The cancellation token to cancel the operation.
+ /// The output memory stream which contains the serialized HTTP content.
+ ///
+ /// Once the operation completes, the returned memory stream represents the HTTP content. The returned stream can then be used to read the content using various stream APIs.
+ /// The method buffers the content to a memory stream.
+ /// Derived classes can override this behavior if there is a better way to retrieve the content as stream.
+ /// For example, a byte array or a string could use a more efficient method way such as wrapping a read-only MemoryStream around the bytes or string.
+ ///
protected virtual Stream CreateContentReadStream(CancellationToken cancellationToken)
{
LoadIntoBuffer(MaxBufferSize, cancellationToken);
diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs
index 68fbd071e7d64a..5be369967df859 100644
--- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs
+++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs
@@ -418,6 +418,9 @@ public Func
+ /// Gets a writable dictionary (that is, a map) of custom properties for the HttpClient requests. The dictionary is initialized empty; you can insert and query key-value pairs for your custom handlers and special processing.
+ ///
public IDictionary Properties =>
_settings._properties ?? (_settings._properties = new Dictionary());
diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/NegotiateStream.cs b/src/libraries/System.Net.Security/src/System/Net/Security/NegotiateStream.cs
index 8ea35c6dfcb452..63fa927bf6fdbb 100644
--- a/src/libraries/System.Net.Security/src/System/Net/Security/NegotiateStream.cs
+++ b/src/libraries/System.Net.Security/src/System/Net/Security/NegotiateStream.cs
@@ -460,6 +460,7 @@ public override void Write(byte[] buffer, int offset, int count)
WriteAsync(new SyncReadWriteAdapter(InnerStream), new ReadOnlyMemory(buffer, offset, count)).GetAwaiter().GetResult();
}
+ /// A that represents the asynchronous read operation.
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
ValidateBufferArguments(buffer, offset, count);
@@ -473,6 +474,7 @@ public override Task WriteAsync(byte[] buffer, int offset, int count, Cancellati
return WriteAsync(new AsyncReadWriteAdapter(InnerStream, cancellationToken), new ReadOnlyMemory(buffer, offset, count));
}
+ /// A that represents the asynchronous read operation.
public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationToken cancellationToken = default)
{
ThrowIfFailed(authSuccessCheck: true);