diff --git a/CHANGES.md b/CHANGES.md index b758e8b39..278e4780e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,8 @@ ## 0.4.5 (2018-03-xx) +* Enable compression support for `NamedFile` + * Add `ResponseError` impl for `SendRequestError`. This improves ergonomics of http client. diff --git a/examples/http-proxy/src/main.rs b/examples/http-proxy/src/main.rs index 4808dc11b..551101c97 100644 --- a/examples/http-proxy/src/main.rs +++ b/examples/http-proxy/src/main.rs @@ -24,7 +24,7 @@ fn index(_req: HttpRequest) -> Box> { .responder() } -/// stream client request to a server response +/// streaming client request to a streaming server response fn streaming(_req: HttpRequest) -> Box> { // send client request client::ClientRequest::get("https://www.rust-lang.org/en-US/") diff --git a/src/fs.rs b/src/fs.rs index 8525c02fd..a0b932bbc 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -85,7 +85,6 @@ impl Responder for NamedFile { fn respond_to(mut self, _: HttpRequest) -> Result { let mut resp = HttpOk.build(); - resp.content_encoding(ContentEncoding::Identity); if let Some(ext) = self.path().extension() { let mime = get_mime_type(&ext.to_string_lossy()); resp.content_type(format!("{}", mime).as_str());