diff --git a/src/net/url/url_test.go b/src/net/url/url_test.go index da022f20d4..b1c3ceb0b7 100644 --- a/src/net/url/url_test.go +++ b/src/net/url/url_test.go @@ -511,6 +511,16 @@ var urltests = []URLTest{ }, "", }, + // golang.org/issue/10433 (path beginning with //) + { + "http://example.com//foo", + &URL{ + Scheme: "http", + Host: "example.com", + Path: "//foo", + }, + "", + }, } // more useful string for debugging than fmt's struct printer @@ -1178,6 +1188,14 @@ var requritests = []RequestURITest{ }, "opaque?q=go+language", }, + { + &URL{ + Scheme: "http", + Host: "example.com", + Path: "//foo", + }, + "//foo", + }, } func TestRequestURI(t *testing.T) {