Skip to main content

spider_body

Function spider_body 

Source
async fn spider_body(
    response: Response,
    limit: usize,
) -> Result<(Vec<u8>, bool)>
Expand description

Read a page body up to limit, reporting whether the cap cut it short.

An advertised length seeds the buffer, and growth past that stays geometric but never exceeds the cap, so a truncated page costs the cap rather than the next power of two above it.