Skip to content

Commit 46dde69

Browse files
committed
chore(actix-files): prepare release 0.6.4
1 parent febba78 commit 46dde69

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

actix-files/CHANGES.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
## Unreleased
44

5+
## 0.6.4
6+
7+
- Fix handling of newlines in filenames.
58
- Minimum supported Rust version (MSRV) is now 1.68 due to transitive `time` dependency.
6-
- Properly handle newlines in filenames. [#3235]
79

810
## 0.6.3
911

actix-files/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "actix-files"
3-
version = "0.6.3"
3+
version = "0.6.4"
44
authors = [
55
"Nikolay Kim <[email protected]>",
66
"Rob Ede <[email protected]>",

actix-files/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
> Static file serving for Actix Web
44
55
[![crates.io](https://img.shields.io/crates/v/actix-files?label=latest)](https://crates.io/crates/actix-files)
6-
[![Documentation](https://docs.rs/actix-files/badge.svg?version=0.6.3)](https://docs.rs/actix-files/0.6.3)
6+
[![Documentation](https://docs.rs/actix-files/badge.svg?version=0.6.4)](https://docs.rs/actix-files/0.6.4)
77
![Version](https://img.shields.io/badge/rustc-1.68+-ab6000.svg)
88
![License](https://img.shields.io/crates/l/actix-files.svg)
99
<br />
10-
[![dependency status](https://deps.rs/crate/actix-files/0.6.3/status.svg)](https://deps.rs/crate/actix-files/0.6.3)
10+
[![dependency status](https://deps.rs/crate/actix-files/0.6.4/status.svg)](https://deps.rs/crate/actix-files/0.6.4)
1111
[![Download](https://img.shields.io/crates/d/actix-files.svg)](https://crates.io/crates/actix-files)
1212
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)
1313

actix-files/src/lib.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,12 @@ mod tests {
572572
async fn test_static_files_with_newlines() {
573573
// Create the file we want to test against ad-hoc. We can't check it in as otherwise
574574
// Windows can't even checkout this repository.
575-
let tmpdir = tempfile::tempdir().unwrap();
576-
let file_with_newlines = tmpdir.path().join("test\nnewline.text");
575+
let temp_dir = tempfile::tempdir().unwrap();
576+
let file_with_newlines = temp_dir.path().join("test\nnewline.text");
577577
fs::write(&file_with_newlines, "Look at my newlines").unwrap();
578+
578579
let srv = test::init_service(
579-
App::new().service(Files::new("", tmpdir.path()).index_file("Cargo.toml")),
580+
App::new().service(Files::new("/", temp_dir.path()).index_file("Cargo.toml")),
580581
)
581582
.await;
582583
let request = TestRequest::get().uri("/test%0Anewline.text").to_request();
@@ -860,7 +861,7 @@ mod tests {
860861

861862
#[actix_rt::test]
862863
async fn test_percent_encoding_2() {
863-
let tmpdir = tempfile::tempdir().unwrap();
864+
let temp_dir = tempfile::tempdir().unwrap();
864865
let filename = match cfg!(unix) {
865866
true => "ض:?#[]{}<>()@!$&'`|*+,;= %20\n.test",
866867
false => "ض#[]{}()@!$&'`+,;= %20.test",
@@ -872,9 +873,9 @@ mod tests {
872873
write!(&mut buf, "%{:02X}", c).unwrap();
873874
buf
874875
});
875-
std::fs::File::create(tmpdir.path().join(filename)).unwrap();
876+
std::fs::File::create(temp_dir.path().join(filename)).unwrap();
876877

877-
let srv = test::init_service(App::new().service(Files::new("", tmpdir.path()))).await;
878+
let srv = test::init_service(App::new().service(Files::new("/", temp_dir.path()))).await;
878879

879880
let req = TestRequest::get()
880881
.uri(&format!("/{}", filename_encoded))

0 commit comments

Comments
 (0)