How do I clear the "Referer" header?

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

Guest

Is there way to modify the "Headers" collection of the HttpRequest class?
Basically, I need to somehow clear the "Referer" header.

Any ideas will be much appreciated! Thanks!
 
You could try the

myWebHeaderCollection.Remove("whatever") method.


--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
 
Milan said:
Is there way to modify the "Headers" collection of the HttpRequest
class? Basically, I need to somehow clear the "Referer" header.

Any ideas will be much appreciated! Thanks!

Why would you want to do this? Your application code is the only code that
will see this property, thus being able to change it would have zero effect.

Cheers,
 
You can rebuild the header but you will need to learn how to use
HTTP Modules and HTTP Handlers. What you will be doing is
using the module to intercept the request. The handler will rebuild the
header and finish resolving the request.
 
Back
Top