webclaw/crates/webclaw-fetch/src
djimenez18 17d805fb6d fix: add danger_accept_invalid_certs to plain TLS fallback clients
The primp-patched rustls fork rejects valid certificates with
`InvalidMessage(UnknownCertificateExtension)` on the impersonated
client, and `InvalidCertificate(UnknownIssuer)` on the plain fallback.

This causes ALL HTTPS requests to fail on Windows (native + WSL),
Linux, and Docker — only HTTP works.

Root cause: the forked rustls at `github.com/deedy5/primp` cannot
parse certain certificate extensions that standard rustls handles.
The plain fallback clients also use primp::Client (which goes through
the same broken fork), so they fail with UnknownIssuer since the
cert chain validation rejects the root CA.

Fix: add `.danger_accept_invalid_certs(true)` to all 4 plain fallback
client builders in `webclaw-fetch/src/client.rs`. These fallback
clients only run when the impersonated TLS client has already failed,
so relaxing cert validation here is acceptable as a workaround.

The proper long-term fix is to update the primp rustls fork to handle
modern certificate extensions correctly.

Tested: HTTPS now works on example.com, apartments.com, and real
apartment property websites that previously returned
"fetch error: request failed: error sending request for url".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 21:14:00 -05:00
..
browser.rs feat: v0.1.2 — TLS fallback, Safari default, Reddit fix, YouTube transcript infra 2026-03-25 18:50:07 +01:00
client.rs fix: add danger_accept_invalid_certs to plain TLS fallback clients 2026-03-28 21:14:00 -05:00
crawler.rs feat: v0.1.3 — crawl streaming, resume/cancel, MCP proxy support 2026-03-25 21:38:28 +01:00
document.rs feat: v0.2.0 — DOCX/XLSX/CSV extraction, HTML format, multi-URL watch, batch LLM 2026-03-26 15:28:23 +01:00
error.rs Initial release: webclaw v0.1.0 — web content extraction for LLMs 2026-03-23 18:31:11 +01:00
lib.rs feat: v0.2.0 — DOCX/XLSX/CSV extraction, HTML format, multi-URL watch, batch LLM 2026-03-26 15:28:23 +01:00
linkedin.rs Initial release: webclaw v0.1.0 — web content extraction for LLMs 2026-03-23 18:31:11 +01:00
proxy.rs Initial release: webclaw v0.1.0 — web content extraction for LLMs 2026-03-23 18:31:11 +01:00
reddit.rs Initial release: webclaw v0.1.0 — web content extraction for LLMs 2026-03-23 18:31:11 +01:00
sitemap.rs Initial release: webclaw v0.1.0 — web content extraction for LLMs 2026-03-23 18:31:11 +01:00