We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The requests always return SignatureDoesNotMatch when CultureInfo.CurrentCulture is 'th-TH' but works when CultureInfo.CurrentCulture is 'en-GB'.
SignatureDoesNotMatch
CultureInfo.CurrentCulture
I found these codes will generated Authorization token with non-gregorian year which is incorrect.
minio-dotnet/Minio/V4Authenticator.cs
Lines 237 to 240 in 254b32f
Lines 223 to 228 in 254b32f
Here is my reproducible code.
using System.Globalization; using Minio; public class Program { public static async Task Main(string[] args) { CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("th-TH"); // CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("en-GB"); var http = new HttpClient(new MyHttpClientHandler()); var endpoint = "play.min.io"; var accessKey = "USERNAME"; // <--- Replace with a valid access key. var secretKey = "PASSWORD"; // <--- Replace with a valid secret key. var factory = new MinioClientFactory(config => { config.WithEndpoint(endpoint) .WithCredentials(accessKey, secretKey) .WithHttpClient(http, true) .WithSSL(); // config.SetTraceOn(new ReqeustLogger()); }); var client = factory.CreateClient().Build(); // client.SetTraceOn(new ReqeustLogger()); var isExists = await client.BucketExistsAsync(new Minio.DataModel.Args.BucketExistsArgs() .WithBucket("my-every-not-existing-random-bucket-2") ); Console.WriteLine(isExists); var download = await client.GetObjectAsync(new Minio.DataModel.Args.GetObjectArgs() .WithBucket("my-every-not-existing-random-bucket-2") .WithObject("Not exists") .WithCallbackStream((stream) => { }) ); Console.WriteLine(download); } } public class MyHttpClientHandler : HttpClientHandler { protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { var respons = await base.SendAsync(request, cancellationToken); Console.WriteLine( request.Headers ); Console.WriteLine(respons.Headers); return respons; } }
The text was updated successfully, but these errors were encountered:
I also have the same problem. add this code before executing any minio actions for reset current culture
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
worked for me.
Sorry, something went wrong.
No branches or pull requests
The requests always return
SignatureDoesNotMatch
whenCultureInfo.CurrentCulture
is 'th-TH' but works whenCultureInfo.CurrentCulture
is 'en-GB'.I found these codes will generated Authorization token with non-gregorian year which is incorrect.
minio-dotnet/Minio/V4Authenticator.cs
Lines 237 to 240 in 254b32f
minio-dotnet/Minio/V4Authenticator.cs
Lines 223 to 228 in 254b32f
Here is my reproducible code.
The text was updated successfully, but these errors were encountered: