aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2024-03-07 12:54:07 +0000
committerAlex <alex@adnab.me>2024-03-07 12:54:07 +0000
commitafee8c2207e2c79975734f1c1fea41b8b942aaa4 (patch)
treed51c5e5b4b7f17522f702d2f31bab54213da8e05 /src/api/s3
parent3168bb34a0082480660e945f7390a5ecab26c665 (diff)
parenteab2b81be2a81422b829e7ef167de7b284695c28 (diff)
downloadgarage-afee8c2207e2c79975734f1c1fea41b8b942aaa4.tar.gz
garage-afee8c2207e2c79975734f1c1fea41b8b942aaa4.zip
Merge pull request 'allow utf-8 in headers + add test for object metadata' (#763) from unicode-headers into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/763
Diffstat (limited to 'src/api/s3')
-rw-r--r--src/api/s3/put.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/s3/put.rs b/src/api/s3/put.rs
index 36523b30..685cca80 100644
--- a/src/api/s3/put.rs
+++ b/src/api/s3/put.rs
@@ -595,7 +595,7 @@ pub(crate) fn get_headers(headers: &HeaderMap<HeaderValue>) -> Result<ObjectVers
// Preserve x-amz-meta- headers
for (k, v) in headers.iter() {
if k.as_str().starts_with("x-amz-meta-") {
- match v.to_str() {
+ match std::str::from_utf8(v.as_bytes()) {
Ok(v_str) => {
other.insert(k.to_string(), v_str.to_string());
}