Y
Yansky
This just doesn't make sense. If I run the code below on this page
in my browser, it follows the
redirect to the new location.
var vidID = document.URL.split("v=")[1].split("&")[0];
var pD = document.getElementById('movie_player');
var fv = pD.getAttribute('flashvars')
var srcWithT = 'http://'+document.domain+'/get_video?video_id='+vidID
+'&t='+fv.split("t=")[1].split("&")[0];
var httpRequest = new XMLHttpRequest();
httpRequest.open("GET", srcWithT, true);
httpRequest.send(null);
httpRequest.onreadystatechange = function() {
if(httpRequest.readyState == 4){
alert(httpRequest.getAllResponseHeaders())
}
};
That shouldn't happen. The same-domain restriction is supposed to
prevent that isn't it?
redirect to the new location.
var vidID = document.URL.split("v=")[1].split("&")[0];
var pD = document.getElementById('movie_player');
var fv = pD.getAttribute('flashvars')
var srcWithT = 'http://'+document.domain+'/get_video?video_id='+vidID
+'&t='+fv.split("t=")[1].split("&")[0];
var httpRequest = new XMLHttpRequest();
httpRequest.open("GET", srcWithT, true);
httpRequest.send(null);
httpRequest.onreadystatechange = function() {
if(httpRequest.readyState == 4){
alert(httpRequest.getAllResponseHeaders())
}
};
That shouldn't happen. The same-domain restriction is supposed to
prevent that isn't it?