Bug #22295
openrgw multisite can't sync obj that has a name with url special character like '/'
0%
Description
obj can sync:
normalobj
obj can't sync:
test/test/test
test/test/test/s
is this a bug?
Updated by Chang Liu over 6 years ago
Hey, what's you ceph version? and would you mind checking the logging of RGW?
Updated by mingshuai wang over 6 years ago
Chang Liu wrote:
Hey, what's you ceph version? and would you mind checking the logging of RGW?
ceph version 10.2.9
int RGWRESTStreamRWRequest::get_obj(RGWAccessKey& key, map<string, string>& extra_headers, rgw_obj& obj)
{
string urlsafe_bucket, urlsafe_object;
url_encode(obj.bucket.get_key(':', 0), urlsafe_bucket);
url_encode(obj.get_orig_obj(), urlsafe_object);
string resource = urlsafe_bucket + "/" + urlsafe_object;
return get_resource(key, extra_headers, resource);
}
when get_obj from source zone, rgw will url_encode obj_name, then "/" will be encoded, source zone will return error -2
Updated by mingshuai wang over 6 years ago
when rgw use civetweb as web frontend,it can deal with obj that has a name with url special character like '/'
however, when rgw use apache as web frontend , it can not deal with obj that has a name with url special character like '/', so, when using apache as web frontend, how to config to solve this problem?
Updated by mingshuai wang over 6 years ago
mingshuai wang wrote:
when rgw use civetweb as web frontend,it can deal with obj that has a name with url special character like '/'
however, when rgw use apache as web frontend , it can not deal with obj that has a name with url special character like '/', so, when using apache as web frontend, how to config to solve this problem?
Updated by mingshuai wang over 6 years ago
apache doesn't allow URLs which contain encoded path separators (%2F for / and additionally %5C for \ on accordant systems) to be used in the path info.
when rgw using apache as web frontend,apache will just return 404, when got request url which contain encoded path separators (%2F for / and additionally %5C for \ on accordant systems) to be used in the path info.
For apache 2.4, add "AllowEncodedSlashes On" to /etc/httpd/conf/extra/rgw.conf to solve this problem.