diff --git a/src/service/resolver/actual.rs b/src/service/resolver/actual.rs index d23ef95a..a4326839 100644 --- a/src/service/resolver/actual.rs +++ b/src/service/resolver/actual.rs @@ -119,7 +119,7 @@ impl super::Service { async fn actual_dest_2(&self, dest: &ServerName, cache: bool, pos: usize) -> Result { debug!("2: Hostname with included port"); let (host, port) = dest.as_str().split_at(pos); - self.conditional_query_and_cache(host, port.parse::().unwrap_or(8448), cache) + self.conditional_query_and_cache(host, port.trim_start_matches(':').parse::().unwrap_or(8448), cache) .await?; Ok(FedDest::Named( @@ -165,7 +165,7 @@ impl super::Service { ) -> Result { debug!("3.2: Hostname with port in .well-known file"); let (host, port) = delegated.split_at(pos); - self.conditional_query_and_cache(host, port.parse::().unwrap_or(8448), cache) + self.conditional_query_and_cache(host, port.trim_start_matches(':').parse::().unwrap_or(8448), cache) .await?; Ok(FedDest::Named(