vendor: update all dependencies to latest versions
This commit is contained in:
+11
-9
@@ -85,11 +85,11 @@ func (qss *QingStorSigner) BuildSignature(request *http.Request) (string, error)
|
||||
signature := strings.TrimSpace(base64.StdEncoding.EncodeToString(h.Sum(nil)))
|
||||
authorization := "QS " + qss.AccessKeyID + ":" + signature
|
||||
|
||||
logger.Debug(fmt.Sprintf(
|
||||
logger.Debugf(fmt.Sprintf(
|
||||
"QingStor authorization: [%d] %s",
|
||||
convert.StringToUnixTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
authorization),
|
||||
)
|
||||
authorization,
|
||||
))
|
||||
|
||||
return authorization, nil
|
||||
}
|
||||
@@ -111,7 +111,7 @@ func (qss *QingStorSigner) BuildQuerySignature(request *http.Request, expires in
|
||||
qss.AccessKeyID, expires, signature,
|
||||
)
|
||||
|
||||
logger.Debug(fmt.Sprintf(
|
||||
logger.Debugf(fmt.Sprintf(
|
||||
"QingStor query signature: [%d] %s",
|
||||
convert.StringToUnixTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
query,
|
||||
@@ -141,7 +141,7 @@ func (qss *QingStorSigner) BuildStringToSign(request *http.Request) (string, err
|
||||
}
|
||||
stringToSign += canonicalizedResource
|
||||
|
||||
logger.Debug(fmt.Sprintf(
|
||||
logger.Debugf(fmt.Sprintf(
|
||||
"QingStor string to sign: [%d] %s",
|
||||
convert.StringToUnixTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
stringToSign,
|
||||
@@ -167,7 +167,7 @@ func (qss *QingStorSigner) BuildQueryStringToSign(request *http.Request, expires
|
||||
}
|
||||
stringToSign += canonicalizedResource
|
||||
|
||||
logger.Debug(fmt.Sprintf(
|
||||
logger.Debugf(fmt.Sprintf(
|
||||
"QingStor query string to sign: [%d] %s",
|
||||
convert.StringToUnixTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
stringToSign,
|
||||
@@ -208,7 +208,7 @@ func (qss *QingStorSigner) buildCanonicalizedResource(request *http.Request) (st
|
||||
parts := []string{}
|
||||
for _, key := range keys {
|
||||
values := query[key]
|
||||
if qss.paramsToSign(key) {
|
||||
if qss.queryToSign(key) {
|
||||
if len(values) > 0 {
|
||||
if values[0] != "" {
|
||||
value := strings.TrimSpace(strings.Join(values, ""))
|
||||
@@ -231,7 +231,7 @@ func (qss *QingStorSigner) buildCanonicalizedResource(request *http.Request) (st
|
||||
path = path + "?" + joinedParts
|
||||
}
|
||||
|
||||
logger.Debug(fmt.Sprintf(
|
||||
logger.Debugf(fmt.Sprintf(
|
||||
"QingStor canonicalized resource: [%d] %s",
|
||||
convert.StringToUnixTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
path,
|
||||
@@ -240,7 +240,7 @@ func (qss *QingStorSigner) buildCanonicalizedResource(request *http.Request) (st
|
||||
return path, nil
|
||||
}
|
||||
|
||||
func (qss *QingStorSigner) paramsToSign(key string) bool {
|
||||
func (qss *QingStorSigner) queryToSign(key string) bool {
|
||||
keysMap := map[string]bool{
|
||||
"acl": true,
|
||||
"cors": true,
|
||||
@@ -252,6 +252,8 @@ func (qss *QingStorSigner) paramsToSign(key string) bool {
|
||||
"upload_id": true,
|
||||
"uploads": true,
|
||||
"image": true,
|
||||
"lifecycle": true,
|
||||
"logging": true,
|
||||
"response-expires": true,
|
||||
"response-cache-control": true,
|
||||
"response-content-type": true,
|
||||
|
||||
Reference in New Issue
Block a user