mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-03-30 12:05:38 +00:00
doh-server: change to google.go
Allow the "cd" parameter to be case insensitive to work with some clients that send True/False instead of true/false such as gDNS.
This commit is contained in:
@@ -71,9 +71,9 @@ func (s *Server) parseRequestGoogle(w http.ResponseWriter, r *http.Request) *DNS
|
||||
|
||||
cdStr := r.FormValue("cd")
|
||||
cd := false
|
||||
if cdStr == "1" || cdStr == "true" {
|
||||
if cdStr == "1" || strings.ToUpper(cdStr) == "TRUE" {
|
||||
cd = true
|
||||
} else if cdStr == "0" || cdStr == "false" || cdStr == "" {
|
||||
} else if cdStr == "0" || strings.ToUpper(cdStr) == "FALSE" || cdStr == "" {
|
||||
} else {
|
||||
return &DNSRequest{
|
||||
errcode: 400,
|
||||
|
||||
Reference in New Issue
Block a user