Fix Mozilla DNS.
GitOrigin-RevId: fe9b90187b5c688272ef399799b7faa029cdcd95
This commit is contained in:
parent
801137dcf3
commit
63f8828003
@ -254,6 +254,7 @@ static ActorOwn<> get_simple_config_dns(Slice address, Slice host, Promise<Simpl
|
|||||||
name = is_test ? "tapv3.stel.com" : "apv3.stel.com";
|
name = is_test ? "tapv3.stel.com" : "apv3.stel.com";
|
||||||
}
|
}
|
||||||
auto get_config = [](HttpQuery &http_query) -> Result<string> {
|
auto get_config = [](HttpQuery &http_query) -> Result<string> {
|
||||||
|
VLOG(config_recoverer) << "Receive DNS response " << http_query.content_;
|
||||||
TRY_RESULT(json, json_decode(http_query.content_));
|
TRY_RESULT(json, json_decode(http_query.content_));
|
||||||
if (json.type() != JsonValue::Type::Object) {
|
if (json.type() != JsonValue::Type::Object) {
|
||||||
return Status::Error("Expected JSON object");
|
return Status::Error("Expected JSON object");
|
||||||
@ -282,7 +283,7 @@ static ActorOwn<> get_simple_config_dns(Slice address, Slice host, Promise<Simpl
|
|||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
return get_simple_config_impl(std::move(promise), scheduler_id,
|
return get_simple_config_impl(std::move(promise), scheduler_id,
|
||||||
PSTRING() << "https://" << address << "?name=" << url_encode(name) << "&type=16",
|
PSTRING() << "https://" << address << "?name=" << url_encode(name) << "&type=TXT",
|
||||||
host.str(), {{"Accept", "application/dns-json"}}, prefer_ipv6, std::move(get_config));
|
host.str(), {{"Accept", "application/dns-json"}}, prefer_ipv6, std::move(get_config));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user