diff options
Diffstat (limited to 'libgo/go/http/cgi/host.go')
-rw-r--r-- | libgo/go/http/cgi/host.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libgo/go/http/cgi/host.go b/libgo/go/http/cgi/host.go index 9ea4c9d8bf2..365a712dfa8 100644 --- a/libgo/go/http/cgi/host.go +++ b/libgo/go/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 } |