From e267539e53ca87e8f830032b169bb71819031ced Mon Sep 17 00:00:00 2001 From: Hubert Date: Wed, 7 Jul 2021 21:39:42 +0200 Subject: [PATCH] save --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 29109a3..324c9cb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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)); }