mirror of
https://github.com/actix/actix-web.git
synced 2024-11-22 17:41:11 +00:00
chore(actix-files): prepare release 0.6.4
This commit is contained in:
parent
febba786fa
commit
46dde69d50
4 changed files with 13 additions and 10 deletions
|
@ -2,8 +2,10 @@
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## 0.6.4
|
||||||
|
|
||||||
|
- Fix handling of newlines in filenames.
|
||||||
- Minimum supported Rust version (MSRV) is now 1.68 due to transitive `time` dependency.
|
- Minimum supported Rust version (MSRV) is now 1.68 due to transitive `time` dependency.
|
||||||
- Properly handle newlines in filenames. [#3235]
|
|
||||||
|
|
||||||
## 0.6.3
|
## 0.6.3
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "actix-files"
|
name = "actix-files"
|
||||||
version = "0.6.3"
|
version = "0.6.4"
|
||||||
authors = [
|
authors = [
|
||||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||||
"Rob Ede <robjtede@icloud.com>",
|
"Rob Ede <robjtede@icloud.com>",
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
> Static file serving for Actix Web
|
> Static file serving for Actix Web
|
||||||
|
|
||||||
[![crates.io](https://img.shields.io/crates/v/actix-files?label=latest)](https://crates.io/crates/actix-files)
|
[![crates.io](https://img.shields.io/crates/v/actix-files?label=latest)](https://crates.io/crates/actix-files)
|
||||||
[![Documentation](https://docs.rs/actix-files/badge.svg?version=0.6.3)](https://docs.rs/actix-files/0.6.3)
|
[![Documentation](https://docs.rs/actix-files/badge.svg?version=0.6.4)](https://docs.rs/actix-files/0.6.4)
|
||||||
![Version](https://img.shields.io/badge/rustc-1.68+-ab6000.svg)
|
![Version](https://img.shields.io/badge/rustc-1.68+-ab6000.svg)
|
||||||
![License](https://img.shields.io/crates/l/actix-files.svg)
|
![License](https://img.shields.io/crates/l/actix-files.svg)
|
||||||
<br />
|
<br />
|
||||||
[![dependency status](https://deps.rs/crate/actix-files/0.6.3/status.svg)](https://deps.rs/crate/actix-files/0.6.3)
|
[![dependency status](https://deps.rs/crate/actix-files/0.6.4/status.svg)](https://deps.rs/crate/actix-files/0.6.4)
|
||||||
[![Download](https://img.shields.io/crates/d/actix-files.svg)](https://crates.io/crates/actix-files)
|
[![Download](https://img.shields.io/crates/d/actix-files.svg)](https://crates.io/crates/actix-files)
|
||||||
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)
|
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)
|
||||||
|
|
||||||
|
|
|
@ -572,11 +572,12 @@ mod tests {
|
||||||
async fn test_static_files_with_newlines() {
|
async fn test_static_files_with_newlines() {
|
||||||
// Create the file we want to test against ad-hoc. We can't check it in as otherwise
|
// Create the file we want to test against ad-hoc. We can't check it in as otherwise
|
||||||
// Windows can't even checkout this repository.
|
// Windows can't even checkout this repository.
|
||||||
let tmpdir = tempfile::tempdir().unwrap();
|
let temp_dir = tempfile::tempdir().unwrap();
|
||||||
let file_with_newlines = tmpdir.path().join("test\nnewline.text");
|
let file_with_newlines = temp_dir.path().join("test\nnewline.text");
|
||||||
fs::write(&file_with_newlines, "Look at my newlines").unwrap();
|
fs::write(&file_with_newlines, "Look at my newlines").unwrap();
|
||||||
|
|
||||||
let srv = test::init_service(
|
let srv = test::init_service(
|
||||||
App::new().service(Files::new("", tmpdir.path()).index_file("Cargo.toml")),
|
App::new().service(Files::new("/", temp_dir.path()).index_file("Cargo.toml")),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
let request = TestRequest::get().uri("/test%0Anewline.text").to_request();
|
let request = TestRequest::get().uri("/test%0Anewline.text").to_request();
|
||||||
|
@ -860,7 +861,7 @@ mod tests {
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn test_percent_encoding_2() {
|
async fn test_percent_encoding_2() {
|
||||||
let tmpdir = tempfile::tempdir().unwrap();
|
let temp_dir = tempfile::tempdir().unwrap();
|
||||||
let filename = match cfg!(unix) {
|
let filename = match cfg!(unix) {
|
||||||
true => "ض:?#[]{}<>()@!$&'`|*+,;= %20\n.test",
|
true => "ض:?#[]{}<>()@!$&'`|*+,;= %20\n.test",
|
||||||
false => "ض#[]{}()@!$&'`+,;= %20.test",
|
false => "ض#[]{}()@!$&'`+,;= %20.test",
|
||||||
|
@ -872,9 +873,9 @@ mod tests {
|
||||||
write!(&mut buf, "%{:02X}", c).unwrap();
|
write!(&mut buf, "%{:02X}", c).unwrap();
|
||||||
buf
|
buf
|
||||||
});
|
});
|
||||||
std::fs::File::create(tmpdir.path().join(filename)).unwrap();
|
std::fs::File::create(temp_dir.path().join(filename)).unwrap();
|
||||||
|
|
||||||
let srv = test::init_service(App::new().service(Files::new("", tmpdir.path()))).await;
|
let srv = test::init_service(App::new().service(Files::new("/", temp_dir.path()))).await;
|
||||||
|
|
||||||
let req = TestRequest::get()
|
let req = TestRequest::get()
|
||||||
.uri(&format!("/{}", filename_encoded))
|
.uri(&format!("/{}", filename_encoded))
|
||||||
|
|
Loading…
Reference in a new issue