Debugging
This commit is contained in:
@@ -755,10 +755,18 @@ var Redownload = function() {
|
||||
function detectWordPress(requests) {
|
||||
// Check the first HTML file only
|
||||
var htmlRequest = requests.find(function(request) {
|
||||
return request.isHTML && request.weightCheck.bodyBuffer;
|
||||
return request.isHTML && request.weightCheck && request.weightCheck.bodyBuffer;
|
||||
});
|
||||
|
||||
return htmlRequest && htmlRequest.weightCheck.bodyBuffer.indexOf('/wp-content/');
|
||||
debug('Checking if it is WordPress on file %s', htmlRequest.url);
|
||||
|
||||
if (htmlRequest && htmlRequest.weightCheck.bodyBuffer.indexOf('/wp-content/') >= 0) {
|
||||
debug('Response: yes.');
|
||||
return true;
|
||||
} else {
|
||||
debug('Response: no.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user