Home > front end >  If two or more metadata headers with the same name are submitted for a resource would the blob servi
If two or more metadata headers with the same name are submitted for a resource would the blob servi

Time:02-01

According to https://docs.microsoft.com/en-us/learn/modules/work-azure-blob-storage/5-set-retrieve-properties-metadata-rest -

"If two or more metadata headers with the same name are submitted for a resource, the Blob service returns status code 400 (Bad Request)".

But According to https://docs.microsoft.com/en-us/learn/modules/work-azure-blob-storage/4-manage-container-properties-metadata-dotnet -

"If two or more metadata headers with the same name are submitted for a resource, Blob storage comma-separates and concatenates the two values and return HTTP response code 200 (OK)".

Well, Which is it?

Am I missing something?

CodePudding user response:

Actually both of them are true.

The first one is for the REST API operation. If you are calling the REST API directly and setting 2 metadata items with the same name, the request will fail with bad request (400 status code error).

The second one is for when you are using .Net SDK. Here, if you are setting 2 metadata items with the same name, the SDK will combine both of them and send a single header request to the REST API.

  •  Tags:  
  • Related