зеркало из https://github.com/Azure/AzureStor.git
fix make_signature, parse_storage_url
This commit is contained in:
Родитель
e9402fdebd
Коммит
ee7f935480
1
NEWS.md
1
NEWS.md
|
@ -4,6 +4,7 @@
|
|||
- Basic support for the new file storage permissions API. When uploading files, they will be created with default filesystem parameters: "inherit" permissions, "now" creation/modified datetimes, and unset attributes. (This has no impact on blob and ADLSgen2.)
|
||||
- Remove a redundant API call to set the Content-Type after a blob or file storage upload.
|
||||
- `list_storage_containers` and related methods will now check for a continuation marker to avoid returning prematurely (thanks to @StatKalli for reporting and providing a fix).
|
||||
- Bug fixes for internal functions.
|
||||
|
||||
# AzureStor 3.1.1
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ make_signature <- function(key, verb, acct_name, resource, options, headers)
|
|||
ms_headers <- headers[grepl("^x-ms", names(headers))]
|
||||
ms_headers <- ms_headers[order(names(ms_headers))]
|
||||
ms_headers <- paste(names(ms_headers), ms_headers, sep=":", collapse="\n")
|
||||
options <- options[!sapply(options, is.null)]
|
||||
options <- paste(names(options), options, sep=":", collapse="\n")
|
||||
|
||||
sig <- paste(verb,
|
||||
|
|
|
@ -170,7 +170,7 @@ parse_storage_url <- function(url)
|
|||
url <- httr::parse_url(url)
|
||||
endpoint <- paste0(url$scheme, "://", url$host, "/")
|
||||
store <- sub("/.*$", "", url$path)
|
||||
path <- sub("^[^/]+/", "", url$path)
|
||||
path <- if(url$path == store) "" else sub("^[^/]+/", "", url$path)
|
||||
c(endpoint, store, path)
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче