Skip to main content

valid_request_id

Function valid_request_id 

Source
pub fn valid_request_id(id: &[u8]) -> bool
Expand description

Whether a client’s x-request-id can be used as given: between one and MAX_REQUEST_ID_LEN bytes, every one of them visible ASCII.

Visible ASCII and nothing else, because the id is written into log lines and echoed back as a header: no spaces to split a log field on, no control characters, nothing a terminal or a log shipper might interpret.