Function http_serve::should_gzip

source ·
pub fn should_gzip(headers: &HeaderMap) -> bool
Expand description

Returns iff it’s preferable to use Content-Encoding: gzip when responding to the given request, rather than no content coding.

Use via should_gzip(req.headers().get()).

Follows the rules of RFC 7231 section 5.3.4.