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:
parent
162f259a73
commit
dd12d125de
2
main.go
2
main.go
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user