(w http.ResponseWriter, r *http.Request)
| 103 | } |
| 104 | |
| 105 | func (s *dohstub) postHandler(w http.ResponseWriter, r *http.Request) { |
| 106 | b, err := ioutil.ReadAll(r.Body) |
| 107 | if err != nil { |
| 108 | http.Error(w, err.Error(), http.StatusBadRequest) |
| 109 | return |
| 110 | } |
| 111 | s.upstreamDNS(b, w, r) |
| 112 | } |
| 113 | |
| 114 | func (s *dohstub) upstreamDNS(b []byte, w http.ResponseWriter, r *http.Request) { |
| 115 | q := new(dns.Msg) |