diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/vapi-background.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/vapi-background.js b/js/vapi-background.js index da32149..9611072 100644 --- a/js/vapi-background.js +++ b/js/vapi-background.js @@ -428,8 +428,9 @@ let channelData = this.channelDataFromChannel(channel); if (ηMatrix.userSettings.resolveCname === true) { - if (HostMap.get(URI)) { - this.operate(channel, HostMap.get(URI), topic); + let key = URI.scheme + '://' + URI.host; + if (HostMap.get(key)) { + this.operate(channel, HostMap.get(key), topic); return; } @@ -450,15 +451,14 @@ let addr = rec.canonicalName; ηMatrix.logger.writeOne(tab, 'info', - 'hostname "' + URI.host - + '" translated to ' + addr); + URI.host + ' => ' + addr); let ios = CC['@mozilla.org/network/io-service;1'] .createInstance(CI.nsIIOService); let uri = ios.newURI(URI.scheme+'://'+addr, null, null); - HostMap.put(URI, uri); + HostMap.put(key, uri); vAPI.httpObserver.operate(channel, uri, topic); }, |