mirror of https://github.com/fafhrd91/actix-web
Add Changelog
This commit is contained in:
parent
884e324789
commit
08ea8f93ea
|
@ -3,6 +3,7 @@
|
|||
## [Unreleased] - 2020-xx-xx
|
||||
|
||||
* Bump minimum supported Rust version to 1.40
|
||||
* Support sending Content-Length when Content-Range is specified #1384
|
||||
|
||||
## [0.2.1] - 2019-12-22
|
||||
|
||||
|
|
|
@ -985,7 +985,7 @@ mod tests {
|
|||
|
||||
// Valid range header
|
||||
let response = srv
|
||||
.head("/")
|
||||
.get("/")
|
||||
.header(header::RANGE, "bytes=10-20")
|
||||
.send()
|
||||
.await
|
||||
|
@ -995,7 +995,7 @@ mod tests {
|
|||
|
||||
// Valid range header, starting from 0
|
||||
let response = srv
|
||||
.head("/")
|
||||
.get("/")
|
||||
.header(header::RANGE, "bytes=0-20")
|
||||
.send()
|
||||
.await
|
||||
|
@ -1018,6 +1018,28 @@ mod tests {
|
|||
assert_eq!(bytes, data);
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_head_content_length_headers() {
|
||||
let srv = test::start(|| {
|
||||
App::new().service(Files::new("/", ".").index_file("tests/test.binary"))
|
||||
});
|
||||
|
||||
let response = srv
|
||||
.head("/")
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let content_length = response
|
||||
.headers()
|
||||
.get(header::CONTENT_LENGTH)
|
||||
.unwrap()
|
||||
.to_str()
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(content_length, "100");
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_static_files_with_spaces() {
|
||||
let mut srv = test::init_service(
|
||||
|
|
Loading…
Reference in New Issue