1
0

Remove func NotFound.

This commit is contained in:
Alexander Andreev 2023-05-25 00:09:30 +04:00
parent 2ef85c6f29
commit f0fc34c8e7
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -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)