Skip to main content

serialize_response_conn

Function serialize_response_conn 

Source
pub fn serialize_response_conn(resp: &HttpResponse, keep_alive: bool) -> Vec<u8> ⓘ
Expand description

Serialize a response with an explicit connection disposition: the writer owns the Connection: header (keep-alive to hold the connection open for the next request, close to end it) exactly as it owns Content-Length — a handler can never desync framing or force persistence.