Skip to main content

safe_content_type

Function safe_content_type 

Source
pub fn safe_content_type(ct: &str) -> &str
Expand description

The Content-Type actually emitted for a handler’s contentType field: the field verbatim when it is wire-safe, else the text/plain default — so a CR/LF smuggled into contentType can never split the response. Both execution tiers route the field through this, keeping them byte-identical.