Skip to main content

fetch_page

Function fetch_page 

Source
pub async fn fetch_page(
    url: &str,
    timeout_secs: u64,
    tls: &TlsConfig,
) -> Result<FetchedPage>
Expand description

Fetch a URL, following redirects manually so the SSRF guard re-validates and re-pins each hop (closing the DNS-rebinding window for redirected hosts too), retrying transient failures with exponential backoff. Caps the redirect chain at [MAX_REDIRECTS], the body at webfetch_core::http::MAX_BODY_BYTES, and the whole operation at [TOTAL_BUDGET_MULTIPLIER] times timeout_secs.