mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
Merge pull request #38737 from IlsooByun/objmeta-key-underscore
rgw: keep underscore in metatdata key Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
This commit is contained in:
commit
116ef52566
@ -54,6 +54,8 @@ int ClientIO::init_env(CephContext *cct)
|
||||
for (auto src = name.begin(); src != name.end(); ++src, ++dest) {
|
||||
if (*src == '-') {
|
||||
*dest = '_';
|
||||
} else if (*src == '_') {
|
||||
*dest = '-';
|
||||
} else {
|
||||
*dest = std::toupper(*src);
|
||||
}
|
||||
|
@ -635,7 +635,7 @@ get_v4_canonical_headers(const req_info& info,
|
||||
|
||||
std::transform(std::begin(token), std::end(token),
|
||||
std::back_inserter(token_env), [](const int c) {
|
||||
return c == '-' ? '_' : std::toupper(c);
|
||||
return c == '-' ? '_' : c == '_' ? '-' : std::toupper(c);
|
||||
});
|
||||
|
||||
if (token_env == "HTTP_CONTENT_LENGTH") {
|
||||
|
@ -410,10 +410,12 @@ void req_info::init_meta_info(const DoutPrefixProvider *dpp, bool *found_bad_met
|
||||
snprintf(name_low, meta_prefixes[0].len - 5 + name_len + 1, "%s%s", meta_prefixes[0].str + 5 /* skip HTTP_ */, name); // normalize meta prefix
|
||||
int j;
|
||||
for (j = 0; name_low[j]; j++) {
|
||||
if (name_low[j] != '_')
|
||||
name_low[j] = tolower(name_low[j]);
|
||||
else
|
||||
if (name_low[j] == '_')
|
||||
name_low[j] = '-';
|
||||
else if (name_low[j] == '-')
|
||||
name_low[j] = '_';
|
||||
else
|
||||
name_low[j] = tolower(name_low[j]);
|
||||
}
|
||||
name_low[j] = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user