1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-11 09:49:29 +00: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

@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous",
"web-programming::http-server", "web-programming::websocket"]
license = "MIT/Apache-2.0"
exclude = [".gitignore", ".travis.yml", ".cargo/config",
"appveyor.yml", "examples/static"]
"appveyor.yml", "./examples/static/*"]
build = "build.rs"
[badges]
@ -56,10 +56,7 @@ smallvec = "0.6"
bitflags = "1.0"
num_cpus = "1.0"
flate2 = "1.0"
# ring nightly compilation bug
# cookie = { version="0.10", features=["percent-encode", "secure"] }
cookie = { git="https://github.com/alexcrichton/cookie-rs.git", features=["percent-encode", "secure"] }
cookie = { version="0.10", features=["percent-encode", "secure"] }
# io
mio = "0.6"

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());