From 8b4b59412df4c7052c4402284daf9d998d636b4e Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 8 Oct 2024 10:35:29 +0100 Subject: [PATCH] fs: fix Don't know how to set key "chunkSize" on upload errors in tests Before this testing any backend which implemented the OpenChunkWriter gave this error: ERROR : writer-at-subdir/writer-at-file: Don't know how to set key "chunkSize" on upload This was due to the ChunkOption incorrectly rendering into HTTP headers which weren't understood by the backend. --- fs/open_options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/open_options.go b/fs/open_options.go index cbcd98cb7..cb48a930e 100644 --- a/fs/open_options.go +++ b/fs/open_options.go @@ -293,7 +293,7 @@ type ChunkOption struct { // Header formats the option as an http header func (o *ChunkOption) Header() (key string, value string) { - return "chunkSize", fmt.Sprintf("%v", o.ChunkSize) + return "", "" } // Mandatory returns whether the option must be parsed or can be ignored