Fix(?) nil deref again.

Upon closer inspection, it seems that err.Error() isn't actually
set here, since no error occurred, we're just rejecting the non-
POST method. Oops.
This commit is contained in:
Auke Kok 2018-02-05 12:42:50 -08:00
parent 162f259a73
commit dd12d125de

View File

@ -73,7 +73,7 @@ func (s FastCGIServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
if req.Method != "POST" {
w.Header().Set("Access-Control-Allow-Headers", "POST")
http.Error(w, err.Error(), 405)
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
log.Printf("Invalid GET from %v\n", remoteip)
return
}