Link to home
Start Free TrialLog in
Avatar of wtyeung
wtyeung

asked on

Set Referer in MSXML2.ServerXMLHttp Object

I need make a ASP page that post some data to a webpage that check HTTP_REFERER server variables.

I used MSXML2.ServerXMLHttp object to make a make the request and setRequestHeader "Referer", Some_URL

the http request made never contain the "Referer" header. I have check it by using a script that just reply the HTTP_REFERER and a HTTP sniffer.

How to spoof the  "Referer" header?
Avatar of Bardobrave
Bardobrave
Flag of Spain image

I'm not very sure of being understanding you, but there is something that sounds strange to me:

I think you are posting a header to an asp page where you get the http_referer server variable.

It's quite probable that the value you are posting won't be vailable until after the called page is executed, and so the referer is retrieved before you overwrite it's value.
Avatar of wtyeung
wtyeung

ASKER

No,
the problem is solved finally. it has to use WinHttp.WinHttpRequest.5.1 object instead.
setting "Referer" header on MSXML2.ServerXMLHttp is of no use, it doesn't appear in the http request.
ASKER CERTIFIED SOLUTION
Avatar of ee_auto
ee_auto

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial