Commit 4e671cf5 authored by Frank Denis's avatar Frank Denis

Don't assume that A RRs will be first

fixes #202
parent 2c7513a2
......@@ -155,7 +155,7 @@ func (xTransport *XTransport) Fetch(method string, url *url.URL, accept string,
var foundIP *string
for _, answer := range in.Answer {
if answer.Header().Rrtype == dns.TypeA {
foundIPx := in.Answer[0].(*dns.A).A.String()
foundIPx := answer.(*dns.A).A.String()
foundIP = &foundIPx
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment