0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-01 10:01:50 +01:00
gitea/modules/setting
wxiaoguang 5727056ea1
Make minio package support legacy MD5 checksum (#23768)
A feedback from discord:
https://discord.com/channels/322538954119184384/561007778139734027/1090185427115319386

Some storages like:

 * https://developers.cloudflare.com/r2/api/s3/api/
 * https://www.backblaze.com/b2/docs/s3_compatible_api.html

They do not support "x-amz-checksum-algorithm" header

But minio recently uses that header with CRC32C by default. So we have
to tell minio to use legacy MD5 checksum.

I guess this needs to be backported because IIRC we 1.19 and 1.20 are
using similar minio package.


The minio package code for SendContentMD5 looks like this:

<details>

<img width="755" alt="image"
src="https://user-images.githubusercontent.com/2114189/228186768-4f2f6f67-62b9-4aee-9251-5af714ad9674.png">

</details>
2023-03-28 11:10:24 -04:00
..
actions.go
admin.go
api.go
attachment.go Add .patch to attachment.ALLOWED_TYPES (#23580) 2023-03-19 15:58:43 -04:00
cache.go
camo.go
config_provider.go handle deprecated settings (#22992) 2023-02-20 16:18:26 -06:00
cors.go
cron_test.go
cron.go
database_sqlite.go
database_test.go
database.go Move pidfile creation from setting to web cmd package (#23285) 2023-03-16 15:22:54 +08:00
federation.go
git.go Support reflogs (#22451) 2023-03-13 15:51:07 +08:00
highlight.go
i18n.go
incoming_email.go
indexer_test.go
indexer.go handle deprecated settings (#22992) 2023-02-20 16:18:26 -06:00
lfs.go handle deprecated settings (#22992) 2023-02-20 16:18:26 -06:00
log.go Parse external request id from request headers, and print it in access log (#22906) 2023-03-10 09:54:32 -06:00
mailer_test.go
mailer.go handle deprecated settings (#22992) 2023-02-20 16:18:26 -06:00
markup.go
metrics.go
migrations.go
mime_type_map.go
mirror.go handle deprecated settings (#22992) 2023-02-20 16:18:26 -06:00
oauth2.go
other.go
packages_test.go
packages.go Add Swift package registry (#22404) 2023-03-13 15:28:39 -05:00
picture.go
project.go
proxy.go
queue.go
repository.go Editor preview support for external renderers (#23333) 2023-03-24 14:12:23 +08:00
security.go
server.go handle deprecated settings (#22992) 2023-02-20 16:18:26 -06:00
service.go
session.go
setting_test.go
setting.go Move pidfile creation from setting to web cmd package (#23285) 2023-03-16 15:22:54 +08:00
ssh.go
storage_test.go
storage.go Make minio package support legacy MD5 checksum (#23768) 2023-03-28 11:10:24 -04:00
task.go handle deprecated settings (#22992) 2023-02-20 16:18:26 -06:00
time.go
ui.go
webhook.go