diff options
author | Michael Stapelberg <stapelberg@debian.org> | 2013-05-14 18:49:42 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2013-05-14 18:50:46 +0200 |
commit | 39b34e75d2776044e6d771c808ddf5043db5a0fd (patch) | |
tree | 1563b8215307a1c3684da43eb372cc8740fed148 /src/pkg/net/http/server.go | |
parent | 75cafdb248f321775838731e79fbdc0db4ffdd1b (diff) | |
parent | efcc50dfdc94c82ee0292bf71992ecb7c0123061 (diff) | |
download | golang-39b34e75d2776044e6d771c808ddf5043db5a0fd.tar.gz |
Merge branch 'upstream-sid' into debian-sid
Conflicts:
lib/codereview/codereview.py
lib/time/zoneinfo.zip
src/pkg/go/types/testdata/expr1.src
test/fixedbugs/issue5105.dir/a.go
test/fixedbugs/issue5260.dir/a.go
In the end, I extracted go1.1.src.tar.gz and used cp -r /tmp/go/* .
To be honest, I still don’t understand why git-import-orig yields merge
errors at all or how that workflow is supposed to work. If someone could
enlighten me, I’d be happy.
Diffstat (limited to 'src/pkg/net/http/server.go')
-rw-r--r-- | src/pkg/net/http/server.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/net/http/server.go b/src/pkg/net/http/server.go index 4792bfba2..b25960705 100644 --- a/src/pkg/net/http/server.go +++ b/src/pkg/net/http/server.go @@ -146,7 +146,7 @@ func (c *conn) closeNotify() <-chan bool { c.mu.Lock() defer c.mu.Unlock() if c.closeNotifyc == nil { - c.closeNotifyc = make(chan bool) + c.closeNotifyc = make(chan bool, 1) if c.hijackedv { // to obey the function signature, even though // it'll never receive a value. @@ -1222,9 +1222,9 @@ func Redirect(w ResponseWriter, r *Request, urlStr string, code int) { } // clean up but preserve trailing slash - trailing := urlStr[len(urlStr)-1] == '/' + trailing := strings.HasSuffix(urlStr, "/") urlStr = path.Clean(urlStr) - if trailing && urlStr[len(urlStr)-1] != '/' { + if trailing && !strings.HasSuffix(urlStr, "/") { urlStr += "/" } urlStr += query @@ -1492,7 +1492,7 @@ type Server struct { // TLSNextProto optionally specifies a function to take over // ownership of the provided TLS connection when an NPN - // protocol upgrade has occured. The map key is the protocol + // protocol upgrade has occurred. The map key is the protocol // name negotiated. The Handler argument should be used to // handle HTTP requests and will initialize the Request's TLS // and RemoteAddr if not already set. The connection is |