mirror of
https://github.com/versity/versitygw.git
synced 2026-01-07 04:06:23 +00:00
test: Get/PutObjectTagging tests with versioning
This commit is contained in:
@@ -14,7 +14,11 @@ type PutTaggingCommand struct {
|
||||
|
||||
func (p *PutTaggingCommand) createTaggingPayload(fields *TaggingFields) error {
|
||||
p.Method = "PUT"
|
||||
p.Query = "tagging="
|
||||
if p.Query != "" {
|
||||
p.Query = "tagging=&" + p.Query
|
||||
} else {
|
||||
p.Query = "tagging="
|
||||
}
|
||||
if len(fields.TagKeys) != len(fields.TagValues) {
|
||||
return errors.New("must be same number of tag keys and tag values")
|
||||
}
|
||||
|
||||
@@ -345,7 +345,11 @@ func (s *S3Command) buildCurlShellCommand() (string, error) {
|
||||
if s.MissingHostParam {
|
||||
return "", fmt.Errorf("missingHostParam option only available for OpenSSL commands")
|
||||
}
|
||||
curlCommand := []string{"curl", "-iks"}
|
||||
curlOpts := "-iks"
|
||||
if s.Method == "HEAD" {
|
||||
curlOpts += "I"
|
||||
}
|
||||
curlCommand := []string{"curl", curlOpts}
|
||||
if s.Method != "GET" {
|
||||
curlCommand = append(curlCommand, fmt.Sprintf("-X %s ", s.Method))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user