save
This commit is contained in:
parent
de08947fe7
commit
e267539e53
|
@ -25,6 +25,7 @@ use std::collections::HashMap;
|
|||
use std::io::{Read, BufRead, Write};
|
||||
use futures::{StreamExt, TryStreamExt, future};
|
||||
use actix_web::web::Buf;
|
||||
use actix_web::http::header::IntoHeaderValue;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "hello.html")]
|
||||
|
@ -186,13 +187,13 @@ async fn git_proto(payload : web::Payload, web::Path((owner, reponame)): web::Pa
|
|||
let mut builder = HttpResponse::build(StatusCode::from_u16(status_code)?);
|
||||
for (name, vec) in headers.iter() {
|
||||
for value in vec {
|
||||
builder = builder.header(name, value);
|
||||
builder.header(name, value.clone());
|
||||
}
|
||||
}
|
||||
|
||||
let mut body = Vec::new();
|
||||
rdr.read_to_end(&mut body)?;
|
||||
return Ok(builder.body(body).unwrap());
|
||||
return Ok(builder.body(body));
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue