summaryrefslogtreecommitdiff
path: root/src/pkg
diff options
context:
space:
mode:
authorMichael Hoisie <hoisie@gmail.com>2010-02-21 19:49:43 -0800
committerMichael Hoisie <hoisie@gmail.com>2010-02-21 19:49:43 -0800
commit35fb0023febe6b501ff6397807e4bc456a1eb8e1 (patch)
tree5ddfc0aaf710f260f111b62e6070a4e4ac04f91a /src/pkg
parent5244cc3fa033dac4e10684dce43e352a075c89b6 (diff)
downloadgolang-35fb0023febe6b501ff6397807e4bc456a1eb8e1.tar.gz
http request URI should never be empty
R=rsc, adg CC=golang-dev http://codereview.appspot.com/217071 Committer: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src/pkg')
-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 d07722402..89a5d837c 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
}