Remove func NotFound.
This commit is contained in:
parent
2ef85c6f29
commit
f0fc34c8e7
@ -229,15 +229,6 @@ func (h *UploadHandlers) Delete(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
func NotFound(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
if !strings.Contains(r.UserAgent(), "curl") {
|
||||
web.Error404(utils.MainSite(r.Host), w)
|
||||
} else {
|
||||
fmt.Fprintln(w, "file not found")
|
||||
}
|
||||
}
|
||||
|
||||
func Error(w http.ResponseWriter, r *http.Request, code int, reason string) {
|
||||
if strings.Contains(r.UserAgent(), "curl") || strings.Contains(r.UserAgent(), "Wget") {
|
||||
http.Error(w, reason, code)
|
||||
|
Loading…
Reference in New Issue
Block a user