Skip to content

Commit

Permalink
chore(actix-files): prepare release 0.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Jan 6, 2024
1 parent febba78 commit 46dde69
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
4 changes: 3 additions & 1 deletion actix-files/CHANGES.md
Expand Up @@ -2,8 +2,10 @@

## Unreleased

## 0.6.4

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

## 0.6.3

Expand Down
2 changes: 1 addition & 1 deletion actix-files/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "actix-files"
version = "0.6.3"
version = "0.6.4"
authors = [
"Nikolay Kim <fafhrd91@gmail.com>",
"Rob Ede <robjtede@icloud.com>",
Expand Down
4 changes: 2 additions & 2 deletions actix-files/README.md
Expand Up @@ -3,11 +3,11 @@
> Static file serving for Actix Web
[![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)
![License](https://img.shields.io/crates/l/actix-files.svg)
<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)
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)

Expand Down
13 changes: 7 additions & 6 deletions actix-files/src/lib.rs
Expand Up @@ -572,11 +572,12 @@ mod tests {
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
// Windows can't even checkout this repository.
let tmpdir = tempfile::tempdir().unwrap();
let file_with_newlines = tmpdir.path().join("test\nnewline.text");
let temp_dir = tempfile::tempdir().unwrap();
let file_with_newlines = temp_dir.path().join("test\nnewline.text");
fs::write(&file_with_newlines, "Look at my newlines").unwrap();

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;
let request = TestRequest::get().uri("/test%0Anewline.text").to_request();
Expand Down Expand Up @@ -860,7 +861,7 @@ mod tests {

#[actix_rt::test]
async fn test_percent_encoding_2() {
let tmpdir = tempfile::tempdir().unwrap();
let temp_dir = tempfile::tempdir().unwrap();
let filename = match cfg!(unix) {
true => "ض:?#[]{}<>()@!$&'`|*+,;= %20\n.test",
false => "ض#[]{}()@!$&'`+,;= %20.test",
Expand All @@ -872,9 +873,9 @@ mod tests {
write!(&mut buf, "%{:02X}", c).unwrap();
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()
.uri(&format!("/{}", filename_encoded))
Expand Down

0 comments on commit 46dde69

Please sign in to comment.