]> Cypherpunks repositories - gostls13.git/commit
net/url: prepend slash to path in String()
authorScott Ferguson <scottwferg@gmail.com>
Thu, 1 Aug 2013 22:52:56 +0000 (15:52 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 1 Aug 2013 22:52:56 +0000 (15:52 -0700)
commit39679ca88f8f37f6797daa9e866f8ba65ee18c9e
treea31ee2d6eb925fdf80f904db9a61499244700b64
parent13507e0697b2749e49341c25b9c1f5414f88d26e
net/url: prepend slash to path in String()

Previously if a path was set manually without a leading /, String()
would not insert the slash when writing its output. This would lead
to situations where a URL that should be http://www.google.com/search
is output as http://www.google.comsearch

Fixes #5927.

R=golang-dev, bradfitz, rsc, 0xjnml
CC=golang-dev
https://golang.org/cl/11698045
src/pkg/net/url/url.go
src/pkg/net/url/url_test.go