Host header in httpwebrequest object

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.
 
J

Joerg Jooss

"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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top