Я получаю следующее исключение:
Сервер совершил нарушение протокола. Раздел = ResponseHeader Detail = CR должен сопровождаться LF
Из этого вопроса:
HttpWebRequestError: Сервер совершил нарушение протокола. Раздел = ResponseHeader Detail = CR должен сопровождаться LF
Я понимаю, что мне нужно установить для useUnsafeHeaderParsing значение True.
Вот мой код:
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(url);
WebResponse myResp = myReq.GetResponse(); //exception is thrown here
useUnsafeHeaderParsing является свойством класса HttpWebRequestElement.
Как мне интегрировать это в приведенный выше код?