1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-24 07:53:00 +01:00

update changelog

This commit is contained in:
Nikolay Kim 2018-05-24 07:56:51 -07:00
parent 174fb0b5f4
commit 556646aaec
2 changed files with 7 additions and 10 deletions

View File

@ -1,11 +1,13 @@
# Changes
## [0.6.10] - 2018-05-xx
## [0.6.10] - 2018-05-24
### Added
* Allow to use path without traling slashes for scope registration #241
* Allow to set encoding for exact NamedFile #239
### Fixed
* `TestServer::post()` actually sends `GET` request #240

View File

@ -117,19 +117,13 @@ impl NamedFile {
self
}
// Set content encoding for serving this file
/// Set content encoding for serving this file
#[inline]
pub fn set_content_encoding(mut self, enc: ContentEncoding) -> Self {
self.encoding = Some(enc);
self
}
// Get content encoding used for serving this file
#[inline]
pub fn content_encoding(&self) -> Option<ContentEncoding> {
self.encoding
}
fn etag(&self) -> Option<header::EntityTag> {
// This etag format is similar to Apache's.
self.modified.as_ref().map(|mtime| {
@ -968,8 +962,9 @@ mod tests {
let req = TestRequest::default().method(Method::GET).finish();
let file = NamedFile::open("Cargo.toml").unwrap();
assert!(file.content_encoding().is_none());
let resp = file.set_content_encoding(ContentEncoding::Identity)
assert!(file.encoding.is_none());
let resp = file
.set_content_encoding(ContentEncoding::Identity)
.respond_to(&req)
.unwrap();