Merge pull request #1891 from jmoenig/reportURL-patch

Fix reportURL for URLs that have // in the middle
upd4.1
Jens Mönig 2017-10-20 19:02:52 +02:00 zatwierdzone przez GitHub
commit be72e053e6
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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;