From 35d02ce2efde7ee8ad08d609be560451fb79d4c6 Mon Sep 17 00:00:00 2001 From: yaotthaha Date: Fri, 6 Oct 2023 21:45:34 +0800 Subject: [PATCH] fix: authority check --- h3/src/proto/headers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h3/src/proto/headers.rs b/h3/src/proto/headers.rs index c9b15a66..7073cca1 100644 --- a/h3/src/proto/headers.rs +++ b/h3/src/proto/headers.rs @@ -31,7 +31,7 @@ impl Header { ) -> Result { match (uri.authority(), fields.get("host")) { (None, None) => Err(HeaderError::MissingAuthority), - (Some(a), Some(h)) if a.as_str() != h => Err(HeaderError::ContradictedAuthority), + (Some(a), Some(h)) if a.host() != h => Err(HeaderError::ContradictedAuthority), _ => Ok(Self { pseudo: Pseudo::request(method, uri, ext), fields,