draft 3 says queries should use "dns", previous drafts said "body"

Send both until servers adjust :/
This commit is contained in:
Frank Denis 2018-02-05 11:36:15 +01:00
parent 43f3e64bd9
commit 5c52199ee1
1 changed files with 3 additions and 1 deletions

View File

@ -166,7 +166,9 @@ func (xTransport *XTransport) DoHQuery(useGet bool, url *url.URL, body []byte, t
if useGet { if useGet {
qs := url.Query() qs := url.Query()
qs.Add("ct", "") qs.Add("ct", "")
qs.Add("body", base64.RawURLEncoding.EncodeToString(body)) encBody := base64.RawURLEncoding.EncodeToString(body)
qs.Add("body", encBody)
qs.Add("dns", encBody)
url2 := *url url2 := *url
url2.RawQuery = qs.Encode() url2.RawQuery = qs.Encode()
return xTransport.Get(&url2, dataType, timeout) return xTransport.Get(&url2, dataType, timeout)