From d0cda43c391a1c35c76b10a5b4b52c00d2a4895b Mon Sep 17 00:00:00 2001 From: Bryce Kahle Date: Mon, 18 Nov 2024 14:47:25 -0800 Subject: [PATCH] do not use named pipe path in URL --- pkg/process/net/check_windows.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/process/net/check_windows.go b/pkg/process/net/check_windows.go index f77dbedb623e3f..b7cc384e7be3f1 100644 --- a/pkg/process/net/check_windows.go +++ b/pkg/process/net/check_windows.go @@ -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 @@ -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 @@ -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)