forked from TrueCloudLab/restic
Update vendored library github.com/ncw/swift
This commit is contained in:
parent
31e156c666
commit
d9ba9279e0
2 changed files with 6 additions and 4 deletions
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
@ -113,7 +113,7 @@
|
||||||
branch = "master"
|
branch = "master"
|
||||||
name = "github.com/ncw/swift"
|
name = "github.com/ncw/swift"
|
||||||
packages = ["."]
|
packages = ["."]
|
||||||
revision = "ae9f0ea1605b9aa6434ed5c731ca35d83ba67c55"
|
revision = "b2a7479cf26fa841ff90dd932d0221cb5c50782d"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "github.com/pkg/errors"
|
name = "github.com/pkg/errors"
|
||||||
|
|
8
vendor/github.com/ncw/swift/swift.go
generated
vendored
8
vendor/github.com/ncw/swift/swift.go
generated
vendored
|
@ -1843,14 +1843,16 @@ type BulkDeleteResult struct {
|
||||||
func (c *Connection) doBulkDelete(objects []string) (result BulkDeleteResult, err error) {
|
func (c *Connection) doBulkDelete(objects []string) (result BulkDeleteResult, err error) {
|
||||||
var buffer bytes.Buffer
|
var buffer bytes.Buffer
|
||||||
for _, s := range objects {
|
for _, s := range objects {
|
||||||
buffer.WriteString(url.QueryEscape(s) + "\n")
|
u := url.URL{Path: s}
|
||||||
|
buffer.WriteString(u.String() + "\n")
|
||||||
}
|
}
|
||||||
resp, headers, err := c.storage(RequestOpts{
|
resp, headers, err := c.storage(RequestOpts{
|
||||||
Operation: "DELETE",
|
Operation: "DELETE",
|
||||||
Parameters: url.Values{"bulk-delete": []string{"1"}},
|
Parameters: url.Values{"bulk-delete": []string{"1"}},
|
||||||
Headers: Headers{
|
Headers: Headers{
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Content-Type": "text/plain",
|
"Content-Type": "text/plain",
|
||||||
|
"Content-Length": strconv.Itoa(buffer.Len()),
|
||||||
},
|
},
|
||||||
ErrorMap: ContainerErrorMap,
|
ErrorMap: ContainerErrorMap,
|
||||||
Body: &buffer,
|
Body: &buffer,
|
||||||
|
|
Loading…
Reference in a new issue