MCPcopy Index your code
hub / github.com/devploit/debugHunter / matchesSoft404

Function matchesSoft404

background.js:761–776  ·  view source on GitHub ↗
(response, text, fingerprint)

Source from the content-addressed store, hash-verified

759}
760
761function matchesSoft404(response, text, fingerprint) {
762 if (!fingerprint) return false;
763
764 // If it returned the same status as our random 404 probe
765 if (fingerprint.status === response.status && fingerprint.status !== 200) {
766 return true;
767 }
768
769 // If content length is very similar to soft-404 (within 10%)
770 const lengthDiff = Math.abs(text.length - fingerprint.length);
771 if (lengthDiff < fingerprint.length * 0.1 && fingerprint.isSoft404) {
772 return true;
773 }
774
775 return false;
776}
777
778async function checkPathWithHead(baseUrl, path, settings) {
779 const testUrl = baseUrl + path;

Callers 1

checkPathsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected