extern std::map<std::string, std::string> rgw_to_http_attrs;
+extern string camelcase_dash_http_attr(const string& orig);
extern string lowercase_dash_http_attr(const string& orig);
extern void rgw_rest_init(CephContext *cct, RGWRados *store, RGWZoneGroup& zone_group);
STREAM_IO(s)->print("%s: %s\r\n", geniter->second.c_str(),
iter->second.c_str());
} else if (strncmp(name, RGW_ATTR_META_PREFIX, PREFIX_LEN) == 0) {
- STREAM_IO(s)->print("X-Account-Meta-%s: %s\r\n", name + PREFIX_LEN,
- iter->second.c_str());
+ STREAM_IO(s)->print("X-Account-Meta-%s: %s\r\n",
+ camelcase_dash_http_attr(name + PREFIX_LEN).c_str(),
+ iter->second.c_str());
}
}
}
STREAM_IO(s)->print("%s: %s\r\n", geniter->second.c_str(),
iter->second.c_str());
} else if (strncmp(name, RGW_ATTR_META_PREFIX, PREFIX_LEN) == 0) {
- STREAM_IO(s)->print("X-Container-Meta-%s: %s\r\n", name + PREFIX_LEN,
- iter->second.c_str());
+ STREAM_IO(s)->print("X-Container-Meta-%s: %s\r\n",
+ camelcase_dash_http_attr(name + PREFIX_LEN).c_str(),
+ iter->second.c_str());
}
}
}
} else if (strncmp(name, RGW_ATTR_META_PREFIX,
sizeof(RGW_ATTR_META_PREFIX)-1) == 0) {
name += sizeof(RGW_ATTR_META_PREFIX) - 1;
- STREAM_IO(s)->print("X-Object-Meta-%s: %s\r\n", name,
+ STREAM_IO(s)->print("X-Object-Meta-%s: %s\r\n",
+ camelcase_dash_http_attr(name).c_str(),
kv.second.c_str());
}
}