Fix case issue

This commit is contained in:
Star Brilliant
2018-03-21 04:14:45 +08:00
parent 5f96e35f29
commit 2b3a261247
3 changed files with 3 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ func (c *Client) handlerFuncGoogle(w dns.ResponseWriter, r *dns.Msg, isTCP bool)
w.WriteMsg(reply)
return
}
question := r.Question[0]
question := &r.Question[0]
// knot-resolver scrambles capitalization, I think it is unfriendly to cache
questionName := strings.ToLower(question.Name)
questionType := ""

View File

@@ -49,7 +49,7 @@ func (c *Client) handlerFuncIETF(w dns.ResponseWriter, r *dns.Msg, isTCP bool) {
return
}
question := r.Question[0]
question := &r.Question[0]
// knot-resolver scrambles capitalization, I think it is unfriendly to cache
questionName := strings.ToLower(question.Name)
questionType := ""

View File

@@ -70,7 +70,7 @@ func (s *Server) parseRequestIETF(w http.ResponseWriter, r *http.Request) *DNSRe
}
if s.conf.Verbose && len(msg.Question) > 0 {
question := msg.Question[0]
question := &msg.Question[0]
questionName := question.Name
questionClass := ""
if qclass, ok := dns.ClassToString[question.Qclass]; ok {