This commit is contained in:
Mohit Sharma 2022-02-03 13:13:42 +05:30
Родитель 3d50a5f3aa
Коммит 29ea7acdf4
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -69,6 +69,7 @@ func NewBlobURLParts(u url.URL) BlobURLParts {
if isIPEndpointStyle(up.Host) {
if accountEndIndex := strings.Index(path, "/"); accountEndIndex == -1 { // Slash not found; path has account name & no container name or blob
up.IPEndpointStyleInfo.AccountName = path
path = "" // No ContainerName present in the URL so path should be empty
} else {
up.IPEndpointStyleInfo.AccountName = path[:accountEndIndex] // The account name is the part between the slashes
path = path[accountEndIndex+1:] // path refers to portion after the account name now (container & blob names)