server
server copied to clipboard
[DRAFT] MDEV-34867: Add no-content-type to S3 engine
Add support for removing the Content-Type header to the S3 engine and implement a per-provider based quirks system. This is required for compatibility with some S3 providers. Written primarily to support Huawei Cloud, but it is can be expanded if we find issues with more providers.
Note, this requires https://github.com/mariadb-corporation/libmarias3/pull/118 to be merged and the submodule updated. It will not compile until then.
- [x] The Jira issue number for this PR is: MDEV-34867
Release Notes
The S3 engine has the following new options:
-
s3-no-content-type
(boolean, off by default): which will disable the defaultContent-Type:
header when talking to S3 endpoints. -
s3-ssl-no-verify
(boolean, off by default): turn this on to disable SSL verification on S3 endpoints. -
s3-provider
(enum): Enables per-provider quirks, options areDefault
(which is default),Amazon
(not required to use Amazon, but enables the Domain based protocol),Huawei
(forces no-content-type on)
These options have equivalents in aria-s3-copy
:
-
-n, --s3-no-content-type
-
-s, --s3-ssl-no-verify
-
-R, --s3-provider=name
How can this PR be tested?
The only way to test this without Huawei cloud is to use Wireshark or similar to snoop the headers when doing regular S3 testing.
It has been tested against a Huawei Cloud instance that has been loaned to us. It has also been tested against MinIO.
Basing the PR against the correct MariaDB version
- [x] This is a new feature or a refactoring, and the PR is based against the
main
branch. - [ ] This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.
PR quality check
- [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
- [x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.