helpers: Use net/url for URL parsing in AbsURL

Fixes #2112
This commit is contained in:
Cameron Moore
2016-04-27 09:54:44 -05:00
parent 16b71bbbb4
commit e4ee1b89ad
2 changed files with 8 additions and 1 deletions

View File

@@ -52,9 +52,11 @@ func TestAbsURL(t *testing.T) {
{"", "http://base/ace/", "http://base/ace/"},
{"/test/2/foo/", "http://base", "http://base/test/2/foo/"},
{"http://abs", "http://base/", "http://abs"},
{"schema://abs", "http://base/", "schema://abs"},
{"//schemaless", "http://base/", "//schemaless"},
{"test/2/foo/", "http://base/path", "http://base/path/test/2/foo/"},
{"/test/2/foo/", "http://base/path", "http://base/test/2/foo/"},
{"http//foo", "http://base/path", "http://base/path/http/foo"},
}
for _, test := range tests {