Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 25adee3

Browse files
committed
Merge pull request #2139 from dotnet-bot/from-tfs
Merge changes from TFS
2 parents aef18a7 + 1183c81 commit 25adee3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/System.Net.Http/src/System/Net/HttpClientHandler.CoreCLR.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,16 @@ public int MaxAutomaticRedirections
121121

122122
public long MaxRequestContentBufferSize
123123
{
124-
get { return _winHttpHandler.MaxRequestContentBufferSize; }
125-
set { _winHttpHandler.MaxRequestContentBufferSize = value; }
124+
// This property has been deprecated. In the .NET Desktop it was only used when the handler needed to automatically
125+
// buffer the request content. That only happened if neither 'Content-Length' nor 'Transfer-Encoding: chunked'
126+
// request headers were specified. So, the handler thus needed to buffer in the request content to determine its
127+
// length and then would choose 'Content-Length' semantics when POST'ing. In CoreCLR and .NETNative, the handler
128+
// will resolve the ambiguity by always choosing 'Transfer-Encoding: chunked'. The handler will never automatically
129+
// buffer in the request content.
130+
get { return 0; }
131+
132+
// TODO: Add message/link to exception explaining the deprecation.
133+
set { throw new PlatformNotSupportedException(); }
126134
}
127135

128136
#endregion Properties

0 commit comments

Comments
 (0)