From 698cd6aaf4e4fd235d5af904376c89f8faf177f7 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Sun, 4 Feb 2018 22:42:31 +0100 Subject: add tests for metadata --- headers.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'headers.go') diff --git a/headers.go b/headers.go index eb65488..3473ac0 100644 --- a/headers.go +++ b/headers.go @@ -95,7 +95,7 @@ func (f StringField) Set(value string) { //Clear removes this key from the original AccountHeaders, ContainerHeaders or //ObjectHeaders instance. func (f StringField) Clear() { - f.metadata.Set(f.key, "") + f.metadata.Clear(f.key) } //UnsignedIntField is a helper type used in the interface of AccountHeaders, @@ -142,7 +142,7 @@ func (f UnsignedIntField) Set(value uint64) { //Clear removes this key from the original AccountHeaders, ContainerHeaders or //ObjectHeaders instance. func (f UnsignedIntField) Clear() { - f.metadata.Set(f.key, "") + f.metadata.Clear(f.key) } //////////////////////////////////////////////////////////////////////////////// @@ -214,9 +214,6 @@ func compileHeaders(headers interface{}, opts *RequestOptions) RequestOptions { //...for container and account metadata, a key is removed by //setting its value to the empty string hdr.Set(info.HeaderName+key, "") - } else { - //for object metadata, you just leave out the metadata fields that - //you want to clear, so we do nothing } } else { //NOTE: The spec says that `value` needs to be percent-encoded, but -- cgit v1.2.3