aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hoisie <hoisie@gmail.com>2010-02-21 19:49:43 -0800
committerAndrew Gerrand <adg@golang.org>2010-02-21 19:49:43 -0800
commit0485a999ff078c760a9cd4013b0f21b6ed90ffda (patch)
tree861605348b48e08c18117ff9be3358007ce84de2
parente198c8e66cf21b6016d6c78382ed75f811760acc (diff)
downloadgo-0485a999ff078c760a9cd4013b0f21b6ed90ffda.tar.gz
go-0485a999ff078c760a9cd4013b0f21b6ed90ffda.zip
http request URI should never be empty
R=rsc, adg CC=golang-dev https://golang.org/cl/217071
-rw-r--r--src/pkg/http/request.go2
1 files changed, 1 insertions, 1 deletions
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
}