one more 'object create' bug fix
diff --git a/openstack/objectstorage/v1/objects/requests.go b/openstack/objectstorage/v1/objects/requests.go
index 01e0b81..2123dd9 100644
--- a/openstack/objectstorage/v1/objects/requests.go
+++ b/openstack/objectstorage/v1/objects/requests.go
@@ -229,17 +229,15 @@
MoreHeaders: h,
}
- for i := 1; i <= 3; i++ {
- resp, err := c.Request("PUT", url, ropts)
- if resp != nil {
- res.Header = resp.Header
- if resp.Header.Get("ETag") == fmt.Sprintf("%x", localChecksum) {
- res.Err = err
- break
- }
- }
- if i == 3 {
- res.Err = fmt.Errorf("Local checksum does not match API ETag header")
+ resp, err := c.Request("PUT", url, ropts)
+ if err != nil {
+ res.Err = err
+ return res
+ }
+ if resp != nil {
+ res.Header = resp.Header
+ if resp.Header.Get("ETag") == fmt.Sprintf("%x", localChecksum) {
+ res.Err = err
return res
}
}