🚑️ fix
All checks were successful
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
JMARyA 2025-03-04 19:41:28 +01:00
parent 3a053aeaa4
commit c2380f4e03
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -107,6 +107,7 @@ impl<'r> Responder<'r, 'static> for DataResponse {
)) ))
.header(Header::new("Accept-Ranges", "bytes")) .header(Header::new("Accept-Ranges", "bytes"))
.header(Header::new("Content-Type", self.content_type.clone())) .header(Header::new("Content-Type", self.content_type.clone()))
.header(Header::new("Content-Length", sliced_data.len().to_string()))
.status(Status::PartialContent) .status(Status::PartialContent)
.streamed_body(Cursor::new(sliced_data.to_vec())) .streamed_body(Cursor::new(sliced_data.to_vec()))
.finalize()); .finalize());
@ -150,6 +151,10 @@ impl<'r> Responder<'r, 'static> for DataResponse {
"Content-Type", "Content-Type",
format!("multipart/byteranges; boundary={boundary}"), format!("multipart/byteranges; boundary={boundary}"),
)) ))
.header(Header::new(
"Content-Length",
multipart_body.len().to_string(),
))
.status(Status::PartialContent) .status(Status::PartialContent)
.streamed_body(Cursor::new(multipart_body.to_vec())) .streamed_body(Cursor::new(multipart_body.to_vec()))
.finalize()); .finalize());