fixes #147 to update the Path rather than the Opaque to avoid losing Host

This commit is contained in:
James Strachan 2016-07-06 09:06:35 +01:00 committed by GitHub
parent 54f9decdbf
commit 0b3463ba65
1 changed files with 2 additions and 2 deletions

View File

@ -102,10 +102,10 @@ func parseURL(s string) (*url.URL, error) {
}
if i := strings.Index(s, "/"); i >= 0 {
u.Opaque = s[i:]
u.Path = s[i:]
s = s[:i]
} else {
u.Opaque = "/"
u.Path = "/"
}
u.Host = s