Skip to main content

MAX_BODY_BYTES

Constant MAX_BODY_BYTES 

Source
const MAX_BODY_BYTES: usize = 1_048_576;
Expand description

Maximum number of body bytes read from a raw response.

Why not Content-Length: raw.githubusercontent.com may respond with chunked transfer encoding, where the header is absent and any pre-check against it would pass unconditionally (#625). The limit is enforced on bytes actually received.