Disable preventing capitalization scrambling

This commit is contained in:
Star Brilliant
2018-07-02 13:48:05 +08:00
parent 87436b7cbf
commit f54b49c090
3 changed files with 2 additions and 5 deletions

View File

@@ -51,8 +51,7 @@ func (c *Client) generateRequestGoogle(w dns.ResponseWriter, r *dns.Msg, isTCP b
}
}
question := &r.Question[0]
// knot-resolver scrambles capitalization, I think it is unfriendly to cache
questionName := strings.ToLower(question.Name)
questionName := question.Name
questionType := ""
if qtype, ok := dns.TypeToString[question.Qtype]; ok {
questionType = qtype

View File

@@ -53,8 +53,7 @@ func (c *Client) generateRequestIETF(w dns.ResponseWriter, r *dns.Msg, isTCP boo
}
question := &r.Question[0]
// knot-resolver scrambles capitalization, I think it is unfriendly to cache
questionName := strings.ToLower(question.Name)
questionName := question.Name
questionType := ""
if qtype, ok := dns.TypeToString[question.Qtype]; ok {
questionType = qtype

View File

@@ -46,7 +46,6 @@ func (s *Server) parseRequestGoogle(w http.ResponseWriter, r *http.Request) *DNS
errtext: "Invalid argument value: \"name\"",
}
}
name = strings.ToLower(name)
if punycode, err := idna.ToASCII(name); err == nil {
name = punycode
} else {