Skip to content

Commit

Permalink
fix: authority check
Browse files Browse the repository at this point in the history
  • Loading branch information
0xffffharry committed Oct 6, 2023
1 parent a57ed22 commit 35d02ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion h3/src/proto/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Header {
) -> Result<Self, HeaderError> {
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,
Expand Down

0 comments on commit 35d02ce

Please sign in to comment.