Skip to content

parseURL() breaks custom Proxy #290

Closed

Description

@canning-duck

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).

Activity

  1. ghost closed this as completedin #292on Oct 13, 2017
  2. ghost added a commit that references this issue on Oct 13, 2017
  3. ghost locked and limited conversation to collaborators on Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions