web: fix header composition

This commit is contained in:
Justus Winter 2022-01-17 14:18:08 +01:00 committed by Vincent Breitmoser
parent f50ce6912a
commit 23fb3f9fb2
1 changed files with 4 additions and 2 deletions

View File

@ -106,14 +106,16 @@ impl MyResponse {
}
pub fn key(armored_key: String, fp: &Fingerprint) -> Self {
let content_disposition = Header::new(CONTENT_DISPOSITION.as_str(), ContentDisposition {
let content_disposition = Header::new(
rocket::http::hyper::header::CONTENT_DISPOSITION.as_str(),
ContentDisposition {
disposition: DispositionType::Attachment,
parameters: vec![
DispositionParam::Filename(
Charset::Us_Ascii, None,
(fp.to_string() + ".asc").into_bytes()),
],
});
}.to_string());
MyResponse::Key(armored_key, content_disposition)
}