1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 18:09:22 +02:00

no need for custom cookie module

This commit is contained in:
Nikolay Kim
2018-01-13 11:33:42 -08:00
parent bc6bb9984f
commit b805d87ee7
2 changed files with 4 additions and 6 deletions

View File

@ -9,8 +9,10 @@ use std::path::{Path, PathBuf};
use std::ops::{Deref, DerefMut};
use mime_guess::get_mime_type;
use param::FromParam;
use handler::{Handler, Responder};
use headers::ContentEncoding;
use httprequest::HttpRequest;
use httpresponse::HttpResponse;
use httpcodes::HTTPOk;
@ -83,7 +85,6 @@ impl Responder for NamedFile {
fn respond_to(mut self, _: HttpRequest) -> Result<HttpResponse, io::Error> {
let mut resp = HTTPOk.build();
use headers::ContentEncoding;
resp.content_encoding(ContentEncoding::Identity);
if let Some(ext) = self.path().extension() {
let mime = get_mime_type(&ext.to_string_lossy());