aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/http
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-10-25 22:20:02 -0700
committerRuss Cox <rsc@golang.org>2011-10-25 22:20:02 -0700
commitdb33959797ad8ef1e86725db62aafb40297ea725 (patch)
tree83205f46a52d3ebc4a22cc151968d958b8524b28 /src/pkg/http
parent6ed3fa6553d84391157eae963eeee5f20b6dca74 (diff)
downloadgo-db33959797ad8ef1e86725db62aafb40297ea725.tar.xz
cgo, goyacc, go/build, html, http, path, path/filepath, testing/quick, test: use rune
Nothing terribly interesting here. R=golang-dev, bradfitz, gri, r CC=golang-dev https://golang.org/cl/5300043
Diffstat (limited to 'src/pkg/http')
-rw-r--r--src/pkg/http/cgi/host.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/http/cgi/host.go b/src/pkg/http/cgi/host.go
index 9ea4c9d8bf..365a712dfa 100644
--- a/src/pkg/http/cgi/host.go
+++ b/src/pkg/http/cgi/host.go
@@ -333,18 +333,18 @@ func (h *Handler) handleInternalRedirect(rw http.ResponseWriter, req *http.Reque
h.PathLocationHandler.ServeHTTP(rw, newReq)
}
-func upperCaseAndUnderscore(rune int) int {
+func upperCaseAndUnderscore(r rune) rune {
switch {
- case rune >= 'a' && rune <= 'z':
- return rune - ('a' - 'A')
- case rune == '-':
+ case r >= 'a' && r <= 'z':
+ return r - ('a' - 'A')
+ case r == '-':
return '_'
- case rune == '=':
+ case r == '=':
// Maybe not part of the CGI 'spec' but would mess up
// the environment in any case, as Go represents the
// environment as a slice of "key=value" strings.
return '_'
}
// TODO: other transformations in spec or practice?
- return rune
+ return r
}