Open pharring opened 1 year ago
Thank you for your feedback. This has been routed to the support team for assistance.
//cc: @AlexanderSher
Alex - can you verify this isn't a regression in Core?
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.
Adding Service team to look into this.
@xgithubtriage Could you please look into this once you get a chance ? Thanks in advance.
Between Azure.Storage.Blobs 12.15.0 and 12.15.1 there was a regression of behavior around setting blob metadata with invalid (non CSharp identifiers)
Repro:
In 12.15.0, this throws an InvalidOperationException with the message "Unable to add header to request or content". In 12.15.1, this throws a RequestFailedException with the status code of 403 and the message "Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature."
Looking a little closer, the regression can also be seen using 12.15.0 with Azure.Core 1.30.0
Note that neither exception is quite "on the mark". For example, if the key is "123" (not a valid C# identifier), you'll get a RequestFailedException with 400 (Bad Request) and an error code of InvalidMetadata. It would be nice to get that in all cases.
Note also that the Azurite emulator (at least the version I have installed with VS 2022) doesn't faithfully emulate this behavior. It allows metadata keys that contain punctuation such as '+'. But it will fail in the same way with characters outside the ASCII range.