Skip to content

Commit

Permalink
Merge pull request #82 from icann/andy_dev
Browse files Browse the repository at this point in the history
Andy dev
  • Loading branch information
anewton1998 authored Sep 6, 2024
2 parents 5073e5a + 7bbe9ae commit 94527ae
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions icann-rdap-cli/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ async fn do_domain_query<'a, W: std::io::Write>(
let mut transactions = RequestResponses::new();
let base_url = get_base_url(&processing_params.bootstrap_type, client, query_type).await?;
let response = do_request(&base_url, query_type, processing_params, client).await;
let registrar_response;
match response {
Ok(response) => {
let source_host = response.http_data.host.to_owned();
Expand All @@ -106,11 +107,12 @@ async fn do_domain_query<'a, W: std::io::Write>(
if let Some(url) = get_related_link(&response.rdap).first() {
info!("Querying domain name from registrar.");
let query_type = QueryType::Url(url.to_string());
let registrar_response =
let registrar_response_result =
do_request(&base_url, &query_type, processing_params, client).await;
match registrar_response {
Ok(registrar_response) => {
regr_source_host = registrar_response.http_data.host;
match registrar_response_result {
Ok(response_data) => {
registrar_response = response_data;
regr_source_host = registrar_response.http_data.host.to_owned();
regr_req_data = RequestData {
req_number: 2,
source_host: &regr_source_host,
Expand All @@ -119,7 +121,7 @@ async fn do_domain_query<'a, W: std::io::Write>(
transactions = do_output(
processing_params,
&regr_req_data,
&response,
&registrar_response,
write,
transactions,
)?;
Expand Down

0 comments on commit 94527ae

Please sign in to comment.