From 9183302b1fcf89d1032b3b2c06c4a3295c78d718 Mon Sep 17 00:00:00 2001 From: Bernerd Schaefer Date: Mon, 6 May 2013 09:56:32 +0200 Subject: [PATCH] Web handler returns 404 for favicon requests --- web/web.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/web.go b/web/web.go index aa5c19ec7..863b671a5 100644 --- a/web/web.go +++ b/web/web.go @@ -41,6 +41,10 @@ type WebService struct { func (w WebService) ServeForever() error { gorest.RegisterService(w.MetricsHandler) + exp.Handle("/favicon.ico", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Error(w, "", 404) + })) + // TODO(julius): This will need to be rewritten once the exp package provides // the coarse mux behaviors via a wrapper function. exp.Handle("/debug/pprof/", http.HandlerFunc(pprof.Index))