From c4034d804a558924b6515a9053f8c4a382827b4a Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 24 Nov 2015 12:11:03 -0500 Subject: [PATCH] this fixes #966 --- platform/firefox/vapi-background.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 812ec7877..d16f7f148 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -2005,9 +2005,15 @@ var httpObserver = { return false; } + // https://github.com/gorhill/uBlock/issues/966 + var hostname = URI.asciiHost; + if ( hostname.endsWith('.') ) { + hostname = hostname.slice(0, -1); + } + var result = this.onBeforeRequest({ frameId: details.frameId, - hostname: URI.asciiHost, + hostname: hostname, parentFrameId: details.parentFrameId, tabId: details.tabId, type: type, @@ -2055,8 +2061,14 @@ var httpObserver = { responseHeaders.push({ name: 'Content-Security-Policy', value: value }); } + // https://github.com/gorhill/uBlock/issues/966 + var hostname = URI.asciiHost; + if ( hostname.endsWith('.') ) { + hostname = hostname.slice(0, -1); + } + var result = this.onHeadersReceived({ - hostname: URI.asciiHost, + hostname: hostname, parentFrameId: channelData[1], responseHeaders: responseHeaders, tabId: channelData[3],