diff --git a/WikiServer.go b/WikiServer.go index effd1d9..c36d35f 100644 --- a/WikiServer.go +++ b/WikiServer.go @@ -112,9 +112,13 @@ func (this *WikiServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Write(content) return - } else if remainingPath == "favicon.ico" && len(this.opts.FaviconFilePath) > 0 { - w.Header().Set("Content-Type", "image/x-icon") - http.ServeFile(w, r, this.opts.FaviconFilePath) + } else if remainingPath == "favicon.ico" { + if len(this.opts.FaviconFilePath) > 0 { + w.Header().Set("Content-Type", "image/x-icon") + http.ServeFile(w, r, this.opts.FaviconFilePath) + } else { + http.Error(w, "Not found", 404) + } return } else if remainingPath == "download-database" {