-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
really this is #147, but we're using a custom Proxy and the behavior of parseurl("") breaks our code as we pass URL's String() to the function that actually searches for the proxy (Java's URI()/ ProxySelector.Select(), we're running on Android using gomobile)
To restate the issue: the connection URL is "wss://example.com/im/connect?foo=bar".
- parseurl("") returns
&url.URL{Scheme:"wss", Opaque:"/im/connect", Host:"example.com", RawQuery:"foo=bar"}
that resolves to "wss:/im/connect?foo=bar" when calling String(). The problem is that the host is missing. - net/url.Parse() would return
&url.URL{Scheme:"wss", Host:"example.com", Path:"/im/connect", RawQuery:"foo=bar"}
that resolves to "wss://example.com/im/connect?foo=bar" as expected (go 1.9).