Turn requests lower case (to get rid of knot-resolver's mixed case)

This commit is contained in:
Star Brilliant committed 2017-11-16 15:47:42 +08:00
1 parent 6f78bd1ff0
commit f621d88d99
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -28,6 +28,7 @@ import (
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/miekg/dns"
"../json-dns"
@@ -129,7 +130,7 @@ func (c *Client) handlerFunc(w dns.ResponseWriter, r *dns.Msg, isTCP bool) {
return
}
question := r.Question[0]
questionName := question.Name
questionName := strings.ToLower(question.Name)
questionType := ""
if qtype, ok := dns.TypeToString[question.Qtype]; ok {
questionType = qtype