Skip to main content

sanitize_hop_by_hop_response_headers

Function sanitize_hop_by_hop_response_headers 

pub fn sanitize_hop_by_hop_response_headers<B>(
    response: &mut Response<B>,
    request_context: &HopByHopHeaderContext,
) -> HopByHopResponseDisposition
Available on crate features http and std only.
Expand description

Sanitize an outbound response using its corresponding request context.

Callers must reject the exchange when this returns HopByHopResponseDisposition::RejectUpgrade; forwarding a stripped 101 would violate HTTP/1.1 framing and desynchronize the connection state.