aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/http/server.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2011-06-28 09:43:14 +1000
committerRob Pike <r@golang.org>2011-06-28 09:43:14 +1000
commitebb1566a46f2f5b2c06ef0f7ad5f7084dce0aed9 (patch)
tree62c412f896baa504ae4a26d452f8cac6ce1aeed8 /src/pkg/http/server.go
parent82a8afdf1411bbe5b08b09d1e94a8d1c4fb5635c (diff)
downloadgo-ebb1566a46f2f5b2c06ef0f7ad5f7084dce0aed9.tar.xz
strings.Split: make the default to split all.
Change the signature of Split to have no count, assuming a full split, and rename the existing Split with a count to SplitN. Do the same to package bytes. Add a gofix module. R=adg, dsymonds, alex.brainman, rsc CC=golang-dev https://golang.org/cl/4661051
Diffstat (limited to 'src/pkg/http/server.go')
-rw-r--r--src/pkg/http/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/http/server.go b/src/pkg/http/server.go
index 08cbed7ad8..ab960f4f0a 100644
--- a/src/pkg/http/server.go
+++ b/src/pkg/http/server.go
@@ -421,7 +421,7 @@ func errorKludge(w *response) {
msg += " would ignore this error page if this text weren't here.\n"
// Is it text? ("Content-Type" is always in the map)
- baseType := strings.Split(w.header.Get("Content-Type"), ";", 2)[0]
+ baseType := strings.SplitN(w.header.Get("Content-Type"), ";", 2)[0]
switch baseType {
case "text/html":
io.WriteString(w, "<!-- ")