Hi,
A utility we wrote some time ago works with almost all of the urls we give it, but stubbornly returns a 302 for 3 of them.
The code is similar to this:
What approach should we take, towards these rare urls that won't return a 200? As noted in the subject, the browser has no problem opening the addresses.
Note that the urls DO redirect, as the 302 indicates. But we also tried replacing the url with the final url that the browser redirects to. So if we originally put in in the script which returned a 302, but the browser redirected to then we also tried in the script and got the same 302 result.
Should we ignore the 302 and consider it a successful connection?
A utility we wrote some time ago works with almost all of the urls we give it, but stubbornly returns a 302 for 3 of them.
The code is similar to this:
Code:
Set objHTTP = CreateObject( "Msxml2.ServerXMLHTTP.6.0" )
Request_s = "GET"
objHTTP.SetTimeouts 2000, 30000, 30000, 60000
'Asyncronous
objHTTP.Open Request_s, Url_s, True
objHTTP.setOption 2, SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS
objHTTP.setRequestHeader "Connection", "keep-alive"
objHTTP.Send
xRet = objHTTP.WaitForResponse(30)
What approach should we take, towards these rare urls that won't return a 200? As noted in the subject, the browser has no problem opening the addresses.
Note that the urls DO redirect, as the 302 indicates. But we also tried replacing the url with the final url that the browser redirects to. So if we originally put in in the script which returned a 302, but the browser redirected to then we also tried in the script and got the same 302 result.
Should we ignore the 302 and consider it a successful connection?