From 812da0900e945a1a52205a8698b40a48aa84b4a7 Mon Sep 17 00:00:00 2001 From: Deathamns Date: Tue, 11 Nov 2014 15:15:21 +0100 Subject: [PATCH] Call XHR.open even if the request will be blocked Without calling it an error may be thrown if other XHR parameters are set. --- src/js/vapi-client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/vapi-client.js b/src/js/vapi-client.js index 151d75e38..9be2363e6 100644 --- a/src/js/vapi-client.js +++ b/src/js/vapi-client.js @@ -317,8 +317,8 @@ if (self.chrome) { "open = function(u) {", "return block(u, 'popup') ? null : wo.apply(this, [].slice.call(arguments));", "};", - "XMLHttpRequest.prototype.open = function(m, u) {", - "return block(u, 'xmlhttprequest') ? null : xo.apply(this, [].slice.call(arguments));", + "XMLHttpRequest.prototype.open = function(m, u, s) {", + "return xo.apply(this, block(u, 'xmlhttprequest') ? ['HEAD', u, s] : [].slice.call(arguments));", "};" ];