Fix webfinger handler.

This commit is contained in:
Naoki Kosaka 2018-11-09 02:54:51 +09:00
parent 934c7089f9
commit 5e3a9379a0

View File

@ -15,7 +15,7 @@ import (
func handleWebfinger(w http.ResponseWriter, r *http.Request) { func handleWebfinger(w http.ResponseWriter, r *http.Request) {
resource := r.URL.Query()["resource"] resource := r.URL.Query()["resource"]
if r.Method == "GET" && len(resource) == 0 { if r.Method != "GET" || len(resource) == 0 {
w.WriteHeader(400) w.WriteHeader(400)
w.Write(nil) w.Write(nil)
} else { } else {