From 0b3463ba6562879734637788924c47613c9664ee Mon Sep 17 00:00:00 2001 From: James Strachan Date: Wed, 6 Jul 2016 09:06:35 +0100 Subject: [PATCH] fixes #147 to update the Path rather than the Opaque to avoid losing Host --- client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index 879d33e..c182e54 100644 --- a/client.go +++ b/client.go @@ -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