bug 1455972 - make TRR prefer address responses to CNAME r=mcmanus

In a DOH response to a query asking for an A or AAAA record, a CNAME
response is often accompanied by A/AAAA resources as well. With this
change, TRR now rather use those address records than following the
CNAME record. This saves name resolver round-trips.

MozReview-Commit-ID: GcjZj5Ehz68

--HG--
extra : rebase_source : b80d9818cb8fa6139feeeec3d2fb11a5b800ee48
This commit is contained in:
Daniel Stenberg 2018-04-23 11:26:04 +02:00
Родитель 04d2fc7cd4
Коммит af8824af35
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -819,7 +819,7 @@ TRR::On200Response()
nsresult rv = DohDecode();
if (NS_SUCCEEDED(rv)) {
if (!mCname.IsEmpty()) {
if (!mDNS.mAddresses.getFirst() && !mCname.IsEmpty()) {
if (!--mCnameLoop) {
LOG(("TRR::On200Response CNAME loop, eject!\n"));
} else {