From b43fbce0443d79a4b4fd135069022c3514e7ccf2 Mon Sep 17 00:00:00 2001 From: antisnatchor Date: Fri, 3 Jan 2014 13:48:31 +0000 Subject: [PATCH] Fixed issue #957. The requester and proxy now work again after the jquery update. --- core/main/client/net.js | 11 ++++++++--- core/main/client/net/requester.js | 5 +---- core/main/client/updater.js | 5 ++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/core/main/client/net.js b/core/main/client/net.js index 174547eab..b70cea132 100644 --- a/core/main/client/net.js +++ b/core/main/client/net.js @@ -292,7 +292,9 @@ beef.net = { // check if same domain or cross domain var cross_domain = true; - + if(domain == "undefined" || path == "undefined"){ + return; + } if (document.domain == domain.replace(/(\r\n|\n|\r)/gm,"")) { //strip eventual line breaks if(document.location.port == "" || document.location.port == null){ cross_domain = !(port == "80" || port == "443"); @@ -300,7 +302,6 @@ beef.net = { if (document.location.port == port) cross_domain = false; } } - // build the url var url = ""; if (path.indexOf("http://") != -1 || path.indexOf("https://") != -1) { @@ -420,7 +421,11 @@ beef.net = { response.was_timedout = true; response.response_body = "ERROR: Timed out\n"; response.port_status = "closed"; - } else if (textStatus == "parsererror") { + /* + * With IE we need to explicitely sey the dataType to "script", + * so there will be always parse-errors if the content is != javascript + * */ + } else if (textStatus == "parsererror" && !beef.browser.isIE()) { response.port_status = "not-http"; } else { response.port_status = "open"; diff --git a/core/main/client/net/requester.js b/core/main/client/net/requester.js index 2aae26fab..e12613ac5 100644 --- a/core/main/client/net/requester.js +++ b/core/main/client/net/requester.js @@ -19,8 +19,7 @@ beef.net.requester = { handler: "requester", send: function(requests_array) { - - for (i in requests_array) { + for(var i=0; i