diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2018-02-04 22:42:31 +0100 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2018-02-04 22:42:31 +0100 |
| commit | 698cd6aaf4e4fd235d5af904376c89f8faf177f7 (patch) | |
| tree | 2323352b54762966f5794cc47c5fd540a755a4ee /headers.go | |
| parent | 137f2df4bc383058d59cc0b283c41ef11a1eaebd (diff) | |
| download | go-schwift-698cd6aaf4e4fd235d5af904376c89f8faf177f7.tar.gz | |
add tests for metadata
Diffstat (limited to 'headers.go')
| -rw-r--r-- | headers.go | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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 |
