You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
audit: the --max-duration parse cap compares the encoded size, so a small gzip body that inflates past 5 MiB is parsed #1497
--max-duration does not parse a page whose HTML is over 5 MiB, because a parse cannot be interrupted. The check compares the page's recorded sizeBytes, which is the Content-Length header, the ENCODED size. A response with Content-Encoding: gzip and a Content-Length of a few KB that inflates to megabytes is therefore parsed in full under --max-duration, which is the cost the cap exists to avoid. The same wire size is used in three places: the crawler's parse gate, the audit pass's site context, and the streaming pass that counts and lists the pages left out.
Found in a review of the released code; confirmed by a local-server probe (a gzip body of about 1 KB on the wire that inflates past the cap was parsed and its links followed).
Acceptance Criteria
A gzip response with a small Content-Length that inflates past the cap is not parsed by the crawler under --max-duration: its links are not followed and it is stored without parsed data (a crawler test through crawler.start() against a local server, failing on the current code).
The same page is judged too large by the audit passes: buildSiteContext leaves it unparsed, and the streaming pass counts it in pagesTooLarge and lists it in tooLargePages (tests failing on the current code).
A multi-byte page whose character count is under the cap and whose UTF-8 bytes are over it is not parsed either.
A page under the cap, gzip or plain, is still parsed and its links followed; a run without --max-duration is unchanged.
The docs say the 5 MiB is the decoded size; CHANGELOG entry.
Activity
fix(crawler,audit-engine): the --max-duration parse cap judges the de…
test(crawler,audit-engine): compare URLs exactly in the parse-cap tes…
test(audit-engine): compare the listed page by equality, not a substr…
test(audit-engine): compare the listed page by equality, not a substr…
fix(crawler,audit-engine): the --max-duration parse cap judges the de…
test(audit-engine): compare the listed page by equality, not a substr…
test(crawler): compare the seed page by parsed path, not a URL suffix…