Skip to content

Commit

Permalink
do not use named pipe path in URL
Browse files Browse the repository at this point in the history
  • Loading branch information
brycekahle committed Nov 18, 2024
1 parent af81bfd commit d0cda43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/process/net/check_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

const (
checksURL = "http://%s/%s/check"
checksURL = "http://sysprobe/%s/check"
)

// GetCheck returns the check output of the specified module
Expand All @@ -35,7 +35,7 @@ func (r *RemoteSysProbeUtil) GetCheck(module sysconfigtypes.ModuleName) (interfa
// as additional checks are added, simply add case statements for
// newly expected check names.
}
url := fmt.Sprintf(checksURL, r.path, module)
url := fmt.Sprintf(checksURL, module)
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, err
Expand All @@ -47,7 +47,7 @@ func (r *RemoteSysProbeUtil) GetCheck(module sysconfigtypes.ModuleName) (interfa
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("conn request failed: socket %s, url %s, status code: %d", r.path, fmt.Sprintf(checksURL, r.path, module), resp.StatusCode)
return nil, fmt.Errorf("conn request failed: socket %s, url %s, status code: %d", r.path, req.URL, resp.StatusCode)
}

body, err := io.ReadAll(resp.Body)
Expand Down

0 comments on commit d0cda43

Please sign in to comment.