//! Helpers for parsing the `X-Strip-Nulls` header that controls null trimming.
use actix_web::HttpRequest;

/// Returns the raw header value for `X-Strip-Nulls` when present.
pub fn get_x_strip_nulls(req: &HttpRequest) -> Option<String> {
    req.headers()
        .get("X-Strip-Nulls")
        .and_then(|h| h.to_str().ok())
        .map(|s| s.to_string())
}
