Use content-lengh when there is no ranges header

This commit is contained in:
Ivan 2024-07-28 12:15:56 +02:00
parent a77c1caace
commit aa2bac8bf5

View file

@ -206,12 +206,12 @@ impl HttpApi {
))
.context("bug")?,
);
} else {
output_headers.insert(
http::header::CONTENT_LENGTH,
HeaderValue::from_str(&format!("{}", stream.len())).context("bug")?,
);
}
} else {
output_headers.insert(
http::header::CONTENT_LENGTH,
HeaderValue::from_str(&format!("{}", stream.len())).context("bug")?,
);
}
let s = tokio_util::io::ReaderStream::new(stream);