mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-11-14 22:07:52 +00:00
A DNS API server SHOULD respond with HTTP status code 415 (Unsupported Media Type) upon receiving a media type it is unable to process.
This commit is contained in:
1 parent
972d404ebc
commit
cb78b9b696
1 file changed
+1
-1
@@ -127,7 +127,7 @@ func (s *Server) handlerFunc(w http.ResponseWriter, r *http.Request) {
|
||||
} else if contentType == "application/dns-udpwireformat" {
|
||||
req = s.parseRequestIETF(w, r)
|
||||
} else {
|
||||
jsonDNS.FormatError(w, fmt.Sprintf("Invalid argument value: \"ct\" = %q", contentType), 400)
|
||||
jsonDNS.FormatError(w, fmt.Sprintf("Invalid argument value: \"ct\" = %q", contentType), 415)
|
||||
return
|
||||
}
|
||||
if req.errcode != 0 {
|
||||
|
||||
Reference in new issue
Block a user