Skip to content

Commit

Permalink
Merge #59216
Browse files Browse the repository at this point in the history
59216: storage: fixed URL path issue for http_storage.go r=dt a=jc1203

Resolves: #59096 

`http_storage.go` should use `path` instead of `filepath` to concatenate path for URL.

Release note (bug fix): fixed a bug in URL handling of HTTP external storage paths on Windows

Co-authored-by: Cheng Jing <[email protected]>
  • Loading branch information
craig[bot] and jc1203 committed Jan 21, 2021
2 parents 028daee + b2402fc commit fbf596c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/storage/cloudimpl/http_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"io/ioutil"
"net/http"
"net/url"
"path/filepath"
"path"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -350,7 +350,7 @@ func (h *httpStorage) req(
}
dest.Host = h.hosts[int(hash.Sum32())%hosts]
}
dest.Path = filepath.Join(dest.Path, file)
dest.Path = path.Join(dest.Path, file)
url := dest.String()
req, err := http.NewRequest(method, url, body)

Expand Down

0 comments on commit fbf596c

Please sign in to comment.