Repository navigation
fix(crawler): identify 403 challenge pages - #914
Conversation
|
Thanks for this. Moving the challenge checks so they cover 403 as well as 503 reads well, and the header short-cut that skips the body read is a nice touch. One behaviour change needs to be reverted before we can merge. A stalled 403 now becomes a timeout instead of a block. Before this PR, a 403 failed the status guard without reading the body, so a 403 was always That matters for sites that tarpit: they answer 403 headers and then never send the body. A 403 root would now read as unreachable rather than as blocked by the site. Every 403 would also wait out the full request deadline before it is recorded. For a 503 the timeout rule exists for a reason (#1729): the generic "Server error: 503" would blame the origin for our own deadline. For a 403 the status already proves the refusal, and the body is only there to name the provider. So for a 403, please treat any failed or timed-out sample read, including Please restore that test's Optional: challenge interstitials are tiny, and |
|
Addressed the review feedback and merged current main. A stalled or otherwise unreadable 403 challenge sample now degrades to the generic blocked result while still cancelling the connection; 503 retains its timeout behavior. I also restored the blocked regression expectation and reduced the challenge sample cap from 512 KB to 64 KB. Validation: 694 crawler tests, crawler typecheck, repository format check, and lint all pass. |
|
Thanks, the classification looks right: a plain 403 stays "Request blocked by server" (including with |
e4773fb to
89212c6
Compare
|
Rebased onto current main in 89212c6 and added the requested Unreleased |
eb20e36 to
8abc1bc
Compare
|
Rebased again onto current |
8abc1bc to
9546d0a
Compare
|
Follow-up: |
9546d0a to
60ed95b
Compare
|
Final validation update: rebased onto current The complete GitHub Actions suite is green on this head, including crawler coverage, CLI tests, audit-engine and golden tests, Compile CLI, format/lint/typecheck, dependency audit, docs build, release tooling, secret scan, CodeQL, and DCO verification. GitHub reports the PR mergeable and clean. |
38e0268 to
f2487f8
Compare
Signed-off-by: Ching-Wei Kang <[email protected]>
Signed-off-by: Ching-Wei Kang <[email protected]>
Signed-off-by: Ching-Wei Kang <[email protected]>
f2487f8 to
500637d
Compare
|
Rebased once more onto current |
|
Merged. Thank you @WilliamK112, keeping a plain 403 with Server: cloudflare generic while only proof from the refused response names the provider is exactly the line #446 asked for. (Nik) |
Summary
cf-mitigated: challengeas Cloudflare challengesServer: cloudflareis presentTesting
bun test packages/crawler/tests/status-guards.test.ts packages/crawler/tests/fetch-body-deadline.test.ts(21 passed)bun test packages/crawler(654 passed)bun run --cwd packages/crawler typecheckCloses #446