The http header options “Connection: keep-alive” and “Authorization: xxx... lost ” in .net6.
It caused by the exception:
Unhandled exception. System.Net.Http.HttpRequestException: Error while copying content to a stream.
---> System.IO.IOException: Unable to write data to the transport connection: Broken pipe.
---> System.Net.Sockets.SocketException (32): Broken pipe
I compared two C# version , the 4.7.2 is worked and include two headers ,but in .net6 that two header options don't include in http headers.
Should I need to construct the httpClient with two header options in .net6? Or other method to add the lost two http header options?
The http header options “Connection: keep-alive” and “Authorization: xxx... lost ” in .net6. It caused by the exception: Unhandled exception. System.Net.Http.HttpRequestException: Error while copying content to a stream. ---> System.IO.IOException: Unable to write data to the transport connection: Broken pipe. ---> System.Net.Sockets.SocketException (32): Broken pipe
I compared two C# version , the 4.7.2 is worked and include two headers ,but in .net6 that two header options don't include in http headers. Should I need to construct the httpClient with two header options in .net6? Or other method to add the lost two http header options?
the header in .netframework 4.7.2
the header in .net6