D
delraydog
I'm having a problem on Windows 2003 Server with this script. It
appears to be a problem with MS XML 4.0 as this code was working fine
under MS XML 3.0 and Windows XP or 2000. Any ideas? The purpose of the
script is to act as a 'proxy' and send a POST or GET to another URL but
return the response through the ASP page as if the ASP page handled the
request:
<%@language=JScript%>
<%
var objSrvHTTP=Server.CreateObject("MSXML2.ServerXMLHTTP");
var url="http://someurl"
if (Request.ServerVariables("REQUEST_METHOD")=="POST") {
var DataToSend = Request.BinaryRead(Request.TotalBytes);
objSrvHTTP.open("POST",url,false);
objSrvHTTP.setRequestHeader("Content-type","application/x-www-form-urlencoded");
objSrvHTTP.send(DataToSend);
} else {
objSrvHTTP.open("GET",url+"?"+Request.ServerVariables("QUERY_STRING"),false);
objSrvHTTP.send();
}
Response.Write(objSrvHTTP.responseText);
%>
(e-mail address removed)
Cliff.
appears to be a problem with MS XML 4.0 as this code was working fine
under MS XML 3.0 and Windows XP or 2000. Any ideas? The purpose of the
script is to act as a 'proxy' and send a POST or GET to another URL but
return the response through the ASP page as if the ASP page handled the
request:
<%@language=JScript%>
<%
var objSrvHTTP=Server.CreateObject("MSXML2.ServerXMLHTTP");
var url="http://someurl"
if (Request.ServerVariables("REQUEST_METHOD")=="POST") {
var DataToSend = Request.BinaryRead(Request.TotalBytes);
objSrvHTTP.open("POST",url,false);
objSrvHTTP.setRequestHeader("Content-type","application/x-www-form-urlencoded");
objSrvHTTP.send(DataToSend);
} else {
objSrvHTTP.open("GET",url+"?"+Request.ServerVariables("QUERY_STRING"),false);
objSrvHTTP.send();
}
Response.Write(objSrvHTTP.responseText);
%>
(e-mail address removed)
Cliff.