Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken pipe error and Header lost in .net6 #89

Open
jkpete opened this issue Apr 9, 2024 · 0 comments
Open

Broken pipe error and Header lost in .net6 #89

jkpete opened this issue Apr 9, 2024 · 0 comments

Comments

@jkpete
Copy link

jkpete commented Apr 9, 2024

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

PUT /dav/Picture/PPT_Test.jpg HTTP/1.1
Content-Type: application/octet-stream
Content-Length: 36081
Connection: keep-alive
Host: xx.xx.xx.xx:xxxx
Accept-Encoding: gzip, deflate
Authorization: Basic Wkt...

the header in .net6

PUT /dav/Picture/PPT_Test.jpg HTTP/1.1
Host: xx.xx.xx.xx:xxxx
Accept-Encoding: gzip, deflate
Content-Type: application/octet-stream
Content-Length: 36081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant