Handle unsupported AliasMode records - #9656
Conversation
| val queries = | ||
| questions.map { question -> | ||
| val questionToQuery = | ||
| questions.associateWith { question -> |
There was a problem hiding this comment.
TIL The returned map preserves the entry iteration order of the original array.
|
|
||
| TYPE_A, TYPE_AAAA -> { | ||
| resourceRecords.mapNotNull { resourceRecord -> | ||
| // Discard resource records that don't fit the query. |
There was a problem hiding this comment.
this seems unlikely and worth warning about, but I assume we think it won't happen, so ignore?
Arguably ew should throw away A answers for a AAAA query, but I'm guessing this is a smart cast.
There was a problem hiding this comment.
Yeah even if we did warn, it's unlikely the recipient of the warning would be able to do something with it.
| if (resourceRecord !is ResourceRecord.Https) return@mapNotNull null | ||
|
|
||
| // OkHttp doesn't yet implement AliasMode resource records. If any AliasMode record is | ||
| // returned, we must ignore ALL returned resource records. |
There was a problem hiding this comment.
TODO log something observable?
There was a problem hiding this comment.
I don't think the recipient of the warning is the person who can do anything about it.
There's probably a DNS record linter tool for DNS admins to learn that their records are malformed.
No description provided.