diff --git a/client/client_test.go b/client/client_test.go index 586abb3f..f060e49f 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -110,8 +110,7 @@ var _ = Describe("S3CompatibleClient", func() { urlRegexp = "https://host-name/v1/swift_account/some-bucket/test-object-id" + `\?temp_url_sig=([a-f0-9]+)` + - `&temp_url_expires=([0-9]+)` + - "\n" + `&temp_url_expires=([0-9]+)` }) Context("when the action is GET", func() { diff --git a/client/openstack_swift_client.go b/client/openstack_swift_client.go index afc3e3c3..26203dd5 100644 --- a/client/openstack_swift_client.go +++ b/client/openstack_swift_client.go @@ -37,7 +37,7 @@ func (c *openstackSwiftS3Client) signedURL(action string, objectID string, expir h.Write([]byte(hmacBody)) signature := hex.EncodeToString(h.Sum(nil)) - url := fmt.Sprintf("https://%s%s?temp_url_sig=%s&temp_url_expires=%d\n", c.s3cliConfig.Host, path, signature, expires) + url := fmt.Sprintf("https://%s%s?temp_url_sig=%s&temp_url_expires=%d", c.s3cliConfig.Host, path, signature, expires) return url, nil }