From 0485a999ff078c760a9cd4013b0f21b6ed90ffda Mon Sep 17 00:00:00 2001 From: Michael Hoisie Date: Sun, 21 Feb 2010 19:49:43 -0800 Subject: [PATCH] http request URI should never be empty R=rsc, adg CC=golang-dev https://golang.org/cl/217071 --- src/pkg/http/request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/http/request.go b/src/pkg/http/request.go index d077224026d..89a5d837cdf 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 }