I am getting the following exception:
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
From this question:
I understand that I need to set useUnsafeHeaderParsing to True.
Here is my code:
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(url);
WebResponse myResp = myReq.GetResponse(); //exception is thrown here
useUnsafeHeaderParsing is a property of HttpWebRequestElement class.
How do I integrate it in the above code?
See Question&Answers more detail:os