1
0
mirror of https://github.com/golang/go synced 2024-11-25 13:57:57 -07:00

http request URI should never be empty

R=rsc, adg
CC=golang-dev
https://golang.org/cl/217071
This commit is contained in:
Michael Hoisie 2010-02-21 19:49:43 -08:00 committed by Andrew Gerrand
parent e198c8e66c
commit 0485a999ff

View File

@ -167,7 +167,7 @@ func (req *Request) Write(w io.Writer) os.Error {
host = req.URL.Host host = req.URL.Host
} }
uri := urlEscape(req.URL.Path, false) uri := valueOrDefault(urlEscape(req.URL.Path, false), "/")
if req.URL.RawQuery != "" { if req.URL.RawQuery != "" {
uri += "?" + req.URL.RawQuery uri += "?" + req.URL.RawQuery
} }