This commit is contained in:
Hubert 2021-07-08 20:53:24 +02:00
parent e4351f7217
commit 08113e45fb
1 changed files with 1 additions and 1 deletions

View File

@ -204,8 +204,8 @@ async fn git_proto(payload : web::Payload, web::Path((owner, reponame)): web::Pa
println!("Write body..."); println!("Write body...");
//let mut body = Vec::new(); //let mut body = Vec::new();
//rdr.bytes() //rdr.bytes()
let mut buff : [u8; 1024] = [0; 1024];
let response = builder.streaming(stream::repeat_with(|| { let response = builder.streaming(stream::repeat_with(|| {
let mut buff : [u8; 1024] = [0; 1024];
match rdr.read(&mut buff[..]) { match rdr.read(&mut buff[..]) {
Ok(l) => {Ok(Bytes::copy_from_slice(&buff[0..l]))} Ok(l) => {Ok(Bytes::copy_from_slice(&buff[0..l]))}
Err(e) => {Err(e)} Err(e) => {Err(e)}