Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: doc/go/docserver/main.go

Issue 872873002: Return 404s for unknown URLs. Also scroll back to the top of the page upon following a link. (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | doc/templates/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: doc/go/docserver/main.go
diff --git a/doc/go/docserver/main.go b/doc/go/docserver/main.go
index d5ee7e2a2508a25a257fd8d7708fcc2aa7b4cfde..3bd366c4a15f6a6dbbc3f72b2080577a007e8380 100644
--- a/doc/go/docserver/main.go
+++ b/doc/go/docserver/main.go
@@ -7,7 +7,6 @@ package main
import (
"flag"
- "fmt"
"mime"
"net/http"
"path/filepath"
@@ -113,7 +112,8 @@ func mainHandler(w http.ResponseWriter, r *http.Request) {
filename, raw, err := d.RawFilename(r.URL.Path)
if err != nil {
- util.ReportError(w, r, err, fmt.Sprintf("Failed to find a matching file for %q %q", r.URL.Path, filename))
+ glog.Infof("Request for unknown path: %s", r.URL.Path)
+ http.NotFound(w, r)
return
}
« no previous file with comments | « no previous file | doc/templates/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698