Skip to main content

MAX_DOCUMENT_BYTES

Constant MAX_DOCUMENT_BYTES 

Source
pub const MAX_DOCUMENT_BYTES: usize = _; // 65_536usize
Expand description

The most of a client metadata document this server will read before giving up on it.

The body is read against this bound rather than to completion, so a host answering a client_id fetch with an endless stream costs this process a bounded amount of memory rather than all of it. Sixty-four kibibytes is this workspace’s ceiling on a small JSON document read off input it does not control, and is orders of magnitude more than the handful of fields ClientMetadataDocument keeps.