Use content-lengh when there is no ranges header
This commit is contained in:
parent
a77c1caace
commit
aa2bac8bf5
1 changed files with 5 additions and 5 deletions
|
|
@ -206,12 +206,12 @@ impl HttpApi {
|
||||||
))
|
))
|
||||||
.context("bug")?,
|
.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);
|
let s = tokio_util::io::ReaderStream::new(stream);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue