NullReferenceException If WithSSL(...) is omitted
warappa opened this issue · 1 comments
warappa commented
If one doesn't call WithSSL(...)
, then a NullReferenceException
is triggered inside the MinIO library.
Steps To Reproduce
Given this code:
var services = new ServiceCollection();
services.AddMinio(client =>
{
client
.WithCredentials("minioadmin", "minioadmin")
.WithEndpoint("127.0.0.1", 9000)
//.WithSSL(false)
;
});
var serviceProvider = services.BuildServiceProvider();
var client = serviceProvider.GetRequiredService<IMinioClient>();
using var stream = File.OpenRead("test-data.json");
var putArgs = new PutObjectArgs()
.WithBucket("spot-layouter-push")
.WithObject("TestPut.json")
.WithStreamData(stream)
.WithObjectSize(stream.Length)
.WithContentType("application/json");
await client.PutObjectAsync(putArgs);
- Have a test file greater than about 6MB
- Execute the code
- Error:
NullReferenceException
Stacktrace
at Minio.DataModel.Response.NewMultipartUploadResponse..ctor(HttpStatusCode statusCode, String responseContent)
at Minio.MinioClient.NewMultipartUploadAsync(NewMultipartUploadPutArgs args, CancellationToken cancellationToken)
at Minio.MinioClient.PutObjectAsync(PutObjectArgs args, CancellationToken cancellationToken)
Expectations
- Omission of calling
WithSSL(...)
should not cause an exception
Info
MinIO (NuGet): 6.0.2
MinIO (Server): 2024-02-06T21:36:22Z
ramondeklein commented
https://minio.slack.com/archives/C3NDUB8UA/p1711617745393569 may also be related to this.