Compare commits

...

2 Commits

Author SHA1 Message Date
Yuki Okushi 0a0b193c01
chore(multipart): do not implement Copy on `MultipartConfig` (#4047) 2026-04-26 18:49:43 +00:00
Yuki Okushi 5bc18551cd
chore(files): upgrade v_htmlescape to 0.17 (#4048) 2026-04-26 17:40:14 +00:00
5 changed files with 18 additions and 8 deletions

15
Cargo.lock generated
View File

@ -3440,10 +3440,19 @@ dependencies = [
]
[[package]]
name = "v_htmlescape"
version = "0.15.8"
name = "v_escape-base"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e8257fbc510f0a46eb602c10215901938b5c2a7d5e70fc11483b1d3c9b5b18c"
checksum = "f1212fce830b75af194b578e55b3db9049f2c8c45f58d397fb25602fdb50fb3d"
[[package]]
name = "v_htmlescape"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "befb3d53c9e3ec641417685896cbc8cc5bd264d6a2e190c56aaef1af24740d99"
dependencies = [
"v_escape-base",
]
[[package]]
name = "vcpkg"

View File

@ -7,6 +7,7 @@
- Fix handling of `bytes=0-`
- Fix `NamedFile` panic when serving files with pre-UNIX epoch modification times. [#2748]
- Fix invalid `Content-Encoding: identity` header in `NamedFile` range responses. [#3191]
- Update `v_htmlescape` dependency to `0.17`.
[#3402]: https://github.com/actix/actix-web/issues/3402
[#2615]: https://github.com/actix/actix-web/pull/2615

View File

@ -32,7 +32,7 @@ mime = "0.3.9"
mime_guess = "2.0.1"
percent-encoding = "2.1"
pin-project-lite = "0.2.7"
v_htmlescape = "0.15.5"
v_htmlescape = "0.17"
# experimental-io-uring
[target.'cfg(target_os = "linux")'.dependencies]

View File

@ -7,7 +7,7 @@ use std::{
use actix_web::{dev::ServiceResponse, HttpRequest, HttpResponse};
use percent_encoding::{utf8_percent_encode, CONTROLS};
use v_htmlescape::escape as escape_html_entity;
use v_htmlescape::escape_fmt;
/// A directory; responds with the generated directory listing.
#[derive(Debug)]
@ -64,7 +64,7 @@ macro_rules! encode_file_url {
/// ```
macro_rules! encode_file_name {
($entry:ident) => {
escape_html_entity(&$entry.file_name().to_string_lossy())
escape_fmt(&$entry.file_name().to_string_lossy())
};
}

View File

@ -47,7 +47,7 @@ enum Flow {
/// [`Multipart`] extractor configuration.
///
/// Add to your app data to have it picked up by [`Multipart`] extractors.
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Debug)]
#[non_exhaustive]
pub struct MultipartConfig {
buffer_limit: usize,
@ -74,7 +74,7 @@ impl MultipartConfig {
}
}
static DEFAULT_CONFIG: MultipartConfig = MultipartConfig {
const DEFAULT_CONFIG: MultipartConfig = MultipartConfig {
buffer_limit: DEFAULT_BUFFER_LIMIT,
};