diff --git a/pingora-core/Cargo.toml b/pingora-core/Cargo.toml index 967a90b7..d6b8d6f4 100644 --- a/pingora-core/Cargo.toml +++ b/pingora-core/Cargo.toml @@ -46,18 +46,18 @@ libc = "0.2.70" chrono = { version = "~0.4.31", features = ["alloc"], default-features = false } prometheus = "0.13" sentry = { version = "0.36", features = [ - "backtrace", - "contexts", - "panic", - "reqwest", - "rustls", + "backtrace", + "contexts", + "panic", + "reqwest", + "rustls", ], default-features = false, optional = true } regex = "1" percent-encoding = "2.1" parking_lot = { version = "0.12", features = ["arc_lock"] } socket2 = { version = ">=0.4, <1.0.0", features = ["all"] } flate2 = { version = "1", features = ["zlib-ng"], default-features = false } -sfv = "0.10.4" +sfv = "0.11.0" rand = "0.8" ahash = { workspace = true } unicase = "2" @@ -79,7 +79,7 @@ windows-sys = { version = "0.59.0", features = ["Win32_Networking_WinSock"] } [dev-dependencies] env_logger = "0.9" reqwest = { version = "0.11", features = [ - "rustls-tls", + "rustls-tls", ], default-features = false } hyper = "0.14" rstest = "0.23.0" diff --git a/pingora-core/src/protocols/http/compression/mod.rs b/pingora-core/src/protocols/http/compression/mod.rs index 2f86efce..f33192b5 100644 --- a/pingora-core/src/protocols/http/compression/mod.rs +++ b/pingora-core/src/protocols/http/compression/mod.rs @@ -415,11 +415,11 @@ fn parse_accept_encoding(accept_encoding: Option<&http::HeaderValue>, list: &mut return; } // properly parse AC header - match sfv::Parser::parse_list(ac.as_bytes()) { + match sfv::Parser::new(ac.as_bytes()).parse_list() { Ok(parsed) => { for item in parsed { if let sfv::ListEntry::Item(i) = item { - if let Some(s) = i.bare_item.as_token() { + if let Some(s) = i.bare_item.as_token().map(sfv::TokenRef::as_str) { // TODO: support q value let algorithm = Algorithm::from(s); // ignore algorithms that we don't understand ignore