HTTP headers and .NET 1.1 SP1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

After installing .NET 1.1 SP1, HttpWebRequest will throw an exception when
connecting to servers that are using improperly formatted headers. Several
developer blogs have posted a workaround that requires inserting the
following
into the app.config file:

<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>

However, this poses challenges for machines that do not have SP1 installed.

I have also seen code that enables this by using reflection to change
private fields on the HttpWebRequest class. Is there a programmatic way to
turn on unsafe header parsing without resorting to reflection?

Thanks for any assistance!
 
=?Utf-8?B?TCBTcGVuY2Vy?= said:
I have also seen code that enables this by using reflection to change
private fields on the HttpWebRequest class. Is there a programmatic way
to turn on unsafe header parsing without resorting to reflection?

Try Indy - its free and has full support for HTTP.

http://www.indyproject.org/


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Empower ASP.NET with IntraWeb
http://www.atozed.com/IntraWeb/
 
Back
Top