Skip to content

Commit

Permalink
Add scheme to the url (http or https) and allow http for http schemes. (
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewDolan authored Oct 19, 2017
1 parent 2ab7aca commit 1d8a6cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions http_collector_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func newHttpCollectorClient(
reporterID uint64,
attributes map[string]string,
) (*httpCollectorClient, error) {
url, err := url.Parse(opts.Collector.HostPort())
url, err := url.Parse(opts.Collector.URL())
if err != nil {
fmt.Println("collector config does not produce valid url", err)
return nil, err
Expand All @@ -75,7 +75,9 @@ func newHttpCollectorClient(
}

func (client *httpCollectorClient) ConnectClient() (Connection, error) {
transport := &http2.Transport{}
transport := &http2.Transport{
AllowHTTP: true,
}

client.client = &http.Client{
Transport: transport,
Expand Down

0 comments on commit 1d8a6cc

Please sign in to comment.