mirror of https://github.com/gorhill/uBlock.git
be ready to deal with invalid hostname
This commit is contained in:
parent
478155d4f6
commit
99be9f5c30
|
@ -708,6 +708,12 @@ PageStore.prototype.filterRequestNoCache = function(context) {
|
||||||
|
|
||||||
PageStore.prototype.logRequest = function(context, result) {
|
PageStore.prototype.logRequest = function(context, result) {
|
||||||
var requestHostname = context.requestHostname;
|
var requestHostname = context.requestHostname;
|
||||||
|
// rhill 20150206:
|
||||||
|
// be prepared to handle invalid requestHostname, I've seen this
|
||||||
|
// happen: http://./
|
||||||
|
if ( requestHostname === '' ) {
|
||||||
|
requestHostname = context.pageHostname;
|
||||||
|
}
|
||||||
if ( this.hostnameToCountMap.hasOwnProperty(requestHostname) === false ) {
|
if ( this.hostnameToCountMap.hasOwnProperty(requestHostname) === false ) {
|
||||||
this.hostnameToCountMap[requestHostname] = 0;
|
this.hostnameToCountMap[requestHostname] = 0;
|
||||||
this.contentLastModified = Date.now();
|
this.contentLastModified = Date.now();
|
||||||
|
|
Loading…
Reference in New Issue