mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: bump github.com/aws/aws-sdk-go-v2/service/sts
Bumps the github-dependencies group with 1 update: [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2). Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.32.4 to 1.33.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/s3/v1.33.1/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.32.4...service/s3/v1.33.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
d457840d21
commit
ecb62d6462
30
vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go
generated
vendored
30
vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go
generated
vendored
@ -22,33 +22,33 @@ func bufCap(b []byte, n int) []byte {
|
||||
// replacePathElement replaces a single element in the path []byte.
|
||||
// Escape is used to control whether the value will be escaped using Amazon path escape style.
|
||||
func replacePathElement(path, fieldBuf []byte, key, val string, escape bool) ([]byte, []byte, error) {
|
||||
fieldBuf = bufCap(fieldBuf, len(key)+3) // { <key> [+] }
|
||||
// search for "{<key>}". If not found, search for the greedy version "{<key>+}". If none are found, return error
|
||||
fieldBuf = bufCap(fieldBuf, len(key)+2) // { <key> }
|
||||
fieldBuf = append(fieldBuf, uriTokenStart)
|
||||
fieldBuf = append(fieldBuf, key...)
|
||||
fieldBuf = append(fieldBuf, uriTokenStop)
|
||||
|
||||
start := bytes.Index(path, fieldBuf)
|
||||
end := start + len(fieldBuf)
|
||||
if start < 0 || len(path[end:]) == 0 {
|
||||
// TODO what to do about error?
|
||||
return path, fieldBuf, fmt.Errorf("invalid path index, start=%d,end=%d. %s", start, end, path)
|
||||
}
|
||||
|
||||
encodeSep := true
|
||||
if path[end] == uriTokenSkip {
|
||||
// '+' token means do not escape slashes
|
||||
if start < 0 {
|
||||
fieldBuf = bufCap(fieldBuf, len(key)+3) // { <key> [+] }
|
||||
fieldBuf = append(fieldBuf, uriTokenStart)
|
||||
fieldBuf = append(fieldBuf, key...)
|
||||
fieldBuf = append(fieldBuf, uriTokenSkip)
|
||||
fieldBuf = append(fieldBuf, uriTokenStop)
|
||||
|
||||
start = bytes.Index(path, fieldBuf)
|
||||
if start < 0 {
|
||||
return path, fieldBuf, fmt.Errorf("invalid path index, start=%d. %s", start, path)
|
||||
}
|
||||
encodeSep = false
|
||||
end++
|
||||
}
|
||||
end := start + len(fieldBuf)
|
||||
|
||||
if escape {
|
||||
val = EscapePath(val, encodeSep)
|
||||
}
|
||||
|
||||
if path[end] != uriTokenStop {
|
||||
return path, fieldBuf, fmt.Errorf("invalid path element, does not contain token stop, %s", path)
|
||||
}
|
||||
end++
|
||||
|
||||
fieldBuf = bufCap(fieldBuf, len(val))
|
||||
fieldBuf = append(fieldBuf, val...)
|
||||
|
||||
|
Reference in New Issue
Block a user