.NET HTTP client causes HTTP 100 Continue and server memory leak


I’m using both Delphi and .NET HTTP clients and they cause different behavior server side.

One thing I noticed is that the .NET version includes the header “Expect: 100-continue”. What is the rationale behind this? The network traffic also shows an additional HTTP 100 Continue from the server in the .NET case.

Delphi: ROIndyHttpChannel with ROBinMessage
.NET: WinInetHttpClientChannel with BinMessage

Also tested with IpHttpClientChannel in .NET with the same result.

Both clients are while the server is using version 9,

Our problem is that the server leaks memory when the .NET client connects.


PS Working for a customer with licenses for latest versions.


This is the default behavior of .NET API used by the WinInetHttpClientChannel channel. You can disable this header by adding this line of code to the application startup code:

System.Net.ServicePointManager.Expect100Continue = false;

However IpHttpClientChannel (which is the recommended channel type to use over WinHttp) should not send this header at all.

Which exactly channel type do you use at the server side? We need to check why it does not properly handle the Expect: 100 Continue header.

Sorry for the inconvenience