Host header in httpwebrequest object

  • Thread starter Thread starter James McLeod
  • Start date Start date
J

James McLeod

I need to be able to set the host header inside the
httpwebrequest object - Anybody figured out how to do
this? Headers.Set("Host", szHost) fails with an
exception and according to the docs, the host header is
set by the system.
 
"James McLeod" spoke:
I need to be able to set the host header inside the
httpwebrequest object - Anybody figured out how to do
this? Headers.Set("Host", szHost) fails with an
exception and according to the docs, the host header is
set by the system.

It is. Unfortunately it's broken in .NET 1.0, because it does not
correctly set the port part of the Host header. Haven't installed .NET
1.1 yet, but I hope MS fixed it.

Cheers,
 
Back
Top