Did some renaming because calling all those fields idna didn't really make sense.

Also switched to the less strict domain to ascii because the errors aren't exactly very well machine readable.
This commit is contained in:
Slatian
2023-02-23 11:32:30 +01:00
parent d202ebb14e
commit 1108b7d653
2 changed files with 11 additions and 11 deletions

View File

@ -77,7 +77,7 @@ pub struct IpResult {
pub struct DigResult {
records: simple_dns::DnsLookupResult,
#[serde(skip_serializing_if = "IdnaName::was_ascii")]
idna: IdnaName,
idn: IdnaName,
}
struct ServiceSharedState {
@ -487,9 +487,9 @@ async fn get_dig_result(
DigResult {
records: simple_dns::lookup(
&state.dns_resolver,
&(idna_name.idna.clone().unwrap_or(name.to_owned())+"."),
&(idna_name.idn.clone().unwrap_or(name.to_owned())+"."),
true).await,
idna: idna_name,
idn: idna_name,
}
}
}