MCPcopy Create free account
hub / github.com/celzero/midway / postHandler

Method postHandler

midway/dns.go:105–112  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

103}
104
105func (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
114func (s *dohstub) upstreamDNS(b []byte, w http.ResponseWriter, r *http.Request) {
115 q := new(dns.Msg)

Callers 1

DohHandlerMethod · 0.95

Calls 1

upstreamDNSMethod · 0.95

Tested by

no test coverage detected