Skip to content
New issue

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

How to Preserve Case Sensitivity for Custom Headers in MinIO .NET SDK's Presigned URLs? #892

Open
sajjadkalantari opened this issue Oct 23, 2023 · 0 comments

Comments

@sajjadkalantari
Copy link

This issue is related to this discussion.

I'm using MinIO in conjunction with the .NET SDK to generate presigned URLs for object downloads. I have a specific requirement to include a custom header in the presigned URL with case sensitivity preserved. However, when I attempt to add headers to the PresignedGetObjectArgs, it appears that the headers are transformed to lowercase in the resulting URL.

Here's a simplified version of the code I'm using:

var args = new PresignedGetObjectArgs()
    .WithBucket(model.BucketName)
    .WithExpiry(model.ExpireIn)
    .WithHeaders(new Dictionary<string, string> { { "versionId", model.VersionId } });

return _minioClient.PresignedGetObjectAsync(args);

The problem is that the resulting URL ends up with lowercase headers, like this:
http://127.0.0.1:9000/testbucket/1.png?[..someheaders]&versionid=somevalue

What I want is for the custom header "versionId" to retain its original case sensitivity in the presigned URL, like this:
http://127.0.0.1:9000/testbucket/1.png?[..someheaders]&versionId=somevalue

Is there a way to achieve this case-sensitive preservation for custom headers in MinIO's .NET SDK when generating presigned URLs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant