From: Michael Hoisie Date: Mon, 22 Feb 2010 03:49:43 +0000 (-0800) Subject: http request URI should never be empty X-Git-Tag: weekly.2010-02-23~18 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0485a999ff078c760a9cd4013b0f21b6ed90ffda;p=gostls13.git http request URI should never be empty R=rsc, adg CC=golang-dev https://golang.org/cl/217071 --- diff --git a/src/pkg/http/request.go b/src/pkg/http/request.go index d077224026..89a5d837cd 100644 --- a/src/pkg/http/request.go +++ b/src/pkg/http/request.go @@ -167,7 +167,7 @@ func (req *Request) Write(w io.Writer) os.Error { host = req.URL.Host } - uri := urlEscape(req.URL.Path, false) + uri := valueOrDefault(urlEscape(req.URL.Path, false), "/") if req.URL.RawQuery != "" { uri += "?" + req.URL.RawQuery }