From 4d69e6d0b49608e92f1fe876117bd3ad172ab922 Mon Sep 17 00:00:00 2001 From: axon-q Date: Tue, 12 Jun 2018 13:47:49 +0000 Subject: [PATCH] fs: minor cleanups to content_disposition --- src/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fs.rs b/src/fs.rs index 101459527..35c78b736 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -276,7 +276,7 @@ impl Responder for NamedFile { if self.status_code != StatusCode::OK { let mut resp = HttpResponse::build(self.status_code); resp.set(header::ContentType(self.content_type.clone())) - .header("Content-Disposition", format!("{}", &self.content_disposition)); + .header(header::CONTENT_DISPOSITION, self.content_disposition.to_string()); if let Some(current_encoding) = self.encoding { resp.content_encoding(current_encoding); @@ -327,7 +327,7 @@ impl Responder for NamedFile { let mut resp = HttpResponse::build(self.status_code); resp.set(header::ContentType(self.content_type.clone())) - .header("Content-Disposition", format!("{}", &self.content_disposition)); + .header(header::CONTENT_DISPOSITION, self.content_disposition.to_string()); if let Some(current_encoding) = self.encoding { resp.content_encoding(current_encoding);