fixes
This commit is contained in:
1 parent
5ec14c6157
commit
d94bd7609a
11 files changed
+232
-9
No files matched your search
@@ -0,0 +1,75 @@
|
||||
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
|
||||
index 05e6ca1..fdda5b9 100644
|
||||
--- a/rust-toolchain.toml
|
||||
+++ b/rust-toolchain.toml
|
||||
@@ -1,4 +1,4 @@
|
||||
[toolchain]
|
||||
-channel = "stable"
|
||||
+channel = "1.88.0"
|
||||
profile = "minimal"
|
||||
components = ["rustfmt", "clippy"]
|
||||
diff --git a/src/cache.rs b/src/cache.rs
|
||||
index fcd6f36..82332e5 100644
|
||||
--- a/src/cache.rs
|
||||
+++ b/src/cache.rs
|
||||
@@ -3774,9 +3774,10 @@ mod tests {
|
||||
.unwrap(),
|
||||
);
|
||||
h.insert("age", HeaderValue::from_static("3"));
|
||||
- let plan = plan(StatusCode::OK, &h, &settings, Duration::from_millis(250)).unwrap();
|
||||
- assert!(plan.initial_age >= Duration::from_secs(10));
|
||||
- assert!(plan.initial_age < Duration::from_secs(12));
|
||||
+ let cache_plan =
|
||||
+ plan(StatusCode::OK, &h, &settings, Duration::from_millis(250)).unwrap();
|
||||
+ assert!(cache_plan.initial_age >= Duration::from_secs(10));
|
||||
+ assert!(cache_plan.initial_age < Duration::from_secs(12));
|
||||
let fresh = plan(
|
||||
StatusCode::OK,
|
||||
&headers("max-age=60"),
|
||||
diff --git a/src/proxy/websocket.rs b/src/proxy/websocket.rs
|
||||
index a25776e..c1d3519 100644
|
||||
--- a/src/proxy/websocket.rs
|
||||
+++ b/src/proxy/websocket.rs
|
||||
@@ -653,7 +653,11 @@ mod tests {
|
||||
.unwrap();
|
||||
request
|
||||
.extensions_mut()
|
||||
- .insert("websocket".parse::<h3::ext::Protocol>().unwrap());
|
||||
+ .insert(
|
||||
+ "websocket"
|
||||
+ .parse::<h3::ext::Protocol>()
|
||||
+ .unwrap_or_else(|_| panic!("websocket is a valid HTTP/3 protocol token")),
|
||||
+ );
|
||||
request
|
||||
}
|
||||
#[test]
|
||||
@@ -702,7 +706,11 @@ mod tests {
|
||||
let mut request = h3_request();
|
||||
request
|
||||
.extensions_mut()
|
||||
- .insert("connect-udp".parse::<h3::ext::Protocol>().unwrap());
|
||||
+ .insert(
|
||||
+ "connect-udp"
|
||||
+ .parse::<h3::ext::Protocol>()
|
||||
+ .unwrap_or_else(|_| panic!("connect-udp is a valid HTTP/3 protocol token")),
|
||||
+ );
|
||||
assert!(validate_h3(&request).is_err());
|
||||
}
|
||||
#[test]
|
||||
diff --git a/tests/http3.rs b/tests/http3.rs
|
||||
index c5990bc..6f775ea 100644
|
||||
--- a/tests/http3.rs
|
||||
+++ b/tests/http3.rs
|
||||
@@ -14,7 +14,11 @@ fn rfc9220_extended_connect_is_recognized() {
|
||||
.unwrap();
|
||||
request
|
||||
.extensions_mut()
|
||||
- .insert("websocket".parse::<h3::ext::Protocol>().unwrap());
|
||||
+ .insert(
|
||||
+ "websocket"
|
||||
+ .parse::<h3::ext::Protocol>()
|
||||
+ .unwrap_or_else(|_| panic!("websocket is a valid HTTP/3 protocol token")),
|
||||
+ );
|
||||
|
||||
assert_eq!(h3_protocol(&request), Some("websocket"));
|
||||
let handshake = validate_h3(&request).expect("valid RFC 9220 bootstrap");
|
||||
Reference in new issue
Block a user