Skip to content

Commit

Permalink
Add support for query strings in check paths
Browse files Browse the repository at this point in the history
  • Loading branch information
David Bresson committed Aug 11, 2016
1 parent 97a7173 commit e191b0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions command/agent/consul/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,11 +703,11 @@ func (c *Syncer) createCheckReg(check *structs.ServiceCheck, serviceReg *consul.
if check.Protocol == "" {
check.Protocol = "http"
}
url := url.URL{
base := url.URL{
Scheme: check.Protocol,
Host: net.JoinHostPort(host, strconv.Itoa(port)),
Path: check.Path,
}
url := base.ResolveReference(url.Parse(check.Path))
chkReg.HTTP = url.String()
case structs.ServiceCheckTCP:
chkReg.TCP = net.JoinHostPort(host, strconv.Itoa(port))
Expand Down

0 comments on commit e191b0e

Please sign in to comment.