diff --git a/src/utils.rs b/src/utils.rs index e73bad0..bbc51b7 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -118,6 +118,10 @@ pub fn fix_headers<'a>(header: &'a str) -> Option { if RE.is_match(header) { Some(RE.replace_all(header, "").to_string()) + + // hyper throws an error in case the Content-Length header contains random value with http2 + } else if header.to_ascii_lowercase() == "content-length" { + Some(String::from("disabled")) } else { None }