diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2021-11-30 14:34:05 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2021-12-06 14:29:36 +0100 |
| commit | d0a9ac8880a545fab3b0d12606fcb4ccd8fd572c (patch) | |
| tree | 03b681eaad1f4e9e19121e519a410eba0bd29127 /tools/syz-testbed/html.go | |
| parent | 45bf1e232e9518f6666c051c242a4ef656a97228 (diff) | |
tools/syz-testbed: respond 404 to favicon requests
Otherwise the page is requested two times by Chrome.
See https://bugs.chromium.org/p/chromium/issues/detail?id=39402
Diffstat (limited to 'tools/syz-testbed/html.go')
| -rw-r--r-- | tools/syz-testbed/html.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/syz-testbed/html.go b/tools/syz-testbed/html.go index bae718fda..d4e23fc4e 100644 --- a/tools/syz-testbed/html.go +++ b/tools/syz-testbed/html.go @@ -25,6 +25,7 @@ func (ctx *TestbedContext) setupHTTPServer() { mux.HandleFunc("/", ctx.httpMain) mux.HandleFunc("/graph", ctx.httpGraph) + mux.HandleFunc("/favicon.ico", ctx.httpFavicon) listener, err := net.Listen("tcp", ctx.Config.HTTP) if err != nil { @@ -40,6 +41,10 @@ func (ctx *TestbedContext) setupHTTPServer() { }() } +func (ctx *TestbedContext) httpFavicon(w http.ResponseWriter, r *http.Request) { + http.Error(w, "Not Found", http.StatusNotFound) +} + func (ctx *TestbedContext) getCurrentStatView(r *http.Request) (*StatView, error) { views, err := ctx.GetStatViews() if err != nil { |
