Posts

Showing posts with the label http-headers

How to change the “Connection: Keep-Alive” header to lowercase “keep-alive” in C#

How to change the “Connection: Keep-Alive” header to lowercase “keep-alive” in C# I am sending some requests to a host which keeps rejecting my requests because of the Connection header in my requests. I need to change it to lowercase. I have the exact same issue as described in this question. However, that question is 3 years old, so I was wondering if there is a solution to this problem now? Connection The answer there talks about using reflection to remove the header first before setting it again in lower-case. Can someone explain how do I achieve that? Thanks. docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/… – Simon Price Jun 30 at 20:21 @user2864740 No. "Some common headers are considered restricted and are either exposed directly by the API (such as Content-Type) or protected by the sy...