Skip to content

Commit

Permalink
fix path escape (#779)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyriltovena authored Jul 18, 2019
1 parent 03dc4e6 commit c3e74b3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmd/logcli/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ func listLabelValues(name string) (*logproto.LabelResponse, error) {
}

func doRequest(path string, out interface{}) error {
addrURL.Path = path
url := addrURL.String()
fullURL, err := url.Parse(addrURL.String() + path)
if err != nil {
return err
}
url := fullURL.String()
if !*quiet {
log.Print(url)
}
Expand All @@ -72,7 +75,7 @@ func doRequest(path string, out interface{}) error {
CAFile: *tlsCACertPath,
CertFile: *tlsClientCertPath,
KeyFile: *tlsClientCertKeyPath,
ServerName: addrURL.Host,
ServerName: fullURL.Host,
InsecureSkipVerify: *tlsSkipVerify,
},
}
Expand Down

0 comments on commit c3e74b3

Please sign in to comment.