mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 17:22:57 +01:00
no need for custom cookie module
This commit is contained in:
parent
bc6bb9984f
commit
b805d87ee7
@ -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"
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user