From 6f17dab0efbac3172b1659ac48b72b7c7ddbd6f2 Mon Sep 17 00:00:00 2001 From: Bernat Romagosa Date: Fri, 20 Oct 2017 09:19:17 +0200 Subject: [PATCH] Fix reportURL for URLs that have // in the middle Reported by @brianharvey. When using proxies we often embed "https://" right in the middle of the URL. The reportURL block was mistakenly thinking that the protocol had already been added to the URL, thus trying to access a relative path. --- threads.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/threads.js b/threads.js index acea1ebf..b75b42e1 100644 --- a/threads.js +++ b/threads.js @@ -2270,7 +2270,7 @@ Process.prototype.reportURL = function (url) { var response; if (!this.httpRequest) { // use the location protocol unless the user specifies otherwise - if (url.indexOf('//') < 0) { + if (url.indexOf('//') < 0 || url.indexOf('//') > 8) { if (location.protocol === 'file:') { // allow requests from locally loaded sources url = 'https://' + url;