fix: Set connect endpoint on correct field in MethodRouter (#3656)

This commit is contained in:
Sindri Pétur Ingimundarson
2026-02-13 22:05:24 +01:00
committed by GitHub
parent 74638ec273
commit 8a9b03cb54
+5 -2
View File
@@ -978,7 +978,7 @@ where
set_endpoint(
"CONNECT",
&mut self.options,
&mut self.connect,
endpoint,
filter,
MethodFilter::CONNECT,
@@ -1445,13 +1445,16 @@ mod tests {
#[crate::test]
async fn merge() {
let mut svc = get(ok).merge(post(ok));
let mut svc = get(ok).merge(post(ok)).merge(connect(ok));
let (status, _, _) = call(Method::GET, &mut svc).await;
assert_eq!(status, StatusCode::OK);
let (status, _, _) = call(Method::POST, &mut svc).await;
assert_eq!(status, StatusCode::OK);
let (status, _, _) = call(Method::CONNECT, &mut svc).await;
assert_eq!(status, StatusCode::OK);
}
#[crate::test]