diff --git a/ecs-object-client-dotnet-test/ECSSDK.Test.ObjectTest.cs b/ecs-object-client-dotnet-test/ECSSDK.Test.ObjectTest.cs index 1d9acf4..abb7336 100644 --- a/ecs-object-client-dotnet-test/ECSSDK.Test.ObjectTest.cs +++ b/ecs-object-client-dotnet-test/ECSSDK.Test.ObjectTest.cs @@ -420,5 +420,30 @@ public void TestStandardAwsStuff() }); } + + [TestMethod] + public void TestObjectWithMetadata() + { + string key = "meta-1"; + string content = "sample object data content ..."; + + PutObjectRequest por = new PutObjectRequest() + { + BucketName = temp_bucket, + Key = key, + ContentBody = content, + }; + + por.Metadata.Add("555", "55555"); + por.Metadata.Add("bbb", "bbbbb"); + por.Metadata.Add("b_b_b", "bubub"); + por.Metadata.Add("aaa", "aaaaa"); + por.Metadata.Add("a_a_a", "auaua"); + por.Metadata.Add("111", "11111"); + + PutObjectResponse response = client.PutObject(por); + Assert.AreEqual(response.HttpStatusCode, System.Net.HttpStatusCode.OK); + + } } } diff --git a/ecs-object-client-dotnet/Internal/S3SignerECS.cs b/ecs-object-client-dotnet/Internal/S3SignerECS.cs index 1ca5142..139253c 100644 --- a/ecs-object-client-dotnet/Internal/S3SignerECS.cs +++ b/ecs-object-client-dotnet/Internal/S3SignerECS.cs @@ -125,7 +125,7 @@ static string BuildStringToSign(IRequest request) static string BuildCanonicalizedHeaders(IDictionary headers) { var sb = new StringBuilder(256); - foreach (var key in headers.Keys.OrderBy(x => x, StringComparer.OrdinalIgnoreCase)) + foreach (var key in headers.Keys.OrderBy(x => x, StringComparer.InvariantCultureIgnoreCase)) { var lowerKey = key.ToLowerInvariant(); if (!lowerKey.StartsWith("x-amz-", StringComparison.Ordinal) && diff --git a/ecs-object-client-dotnet/Properties/AssemblyInfo.cs b/ecs-object-client-dotnet/Properties/AssemblyInfo.cs index ceda850..4555cec 100644 --- a/ecs-object-client-dotnet/Properties/AssemblyInfo.cs +++ b/ecs-object-client-dotnet/Properties/AssemblyInfo.cs @@ -47,5 +47,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.1.0")] +[assembly: AssemblyFileVersion("1.0.1.0")]